[project] name = "keylogger" version = "1.0.0" description = "Keylogger for security research and testing" requires-python = ">=3.13" authors = [ {name = "CarerPerez-dev", email = "support@certgames.com"} ] readme = "README.md" license = {text = "MIT"} dependencies = [ "pynput==1.8.1", "requests==2.33.0", ] [project.optional-dependencies] windows = [ "pywin32==311", "psutil==7.2.1", ] macos = [ "pyobjc-framework-Cocoa==12.1", ] dev = [ "pytest==9.0.3", "ruff==0.14.14", "mypy==1.19.1", "pylint==4.0.4", "types-requests==2.32.4.20260107", "yapf==0.43.0", ] [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["keylogger.py"] [tool.ruff] target-version = "py313" line-length = 88 indent-width = 4 exclude = [ ".git", ".venv", "__pycache__", "venv", "build", "dist", ] [tool.ruff.lint] select = [ "E", # pycodestyle errors "F", # Pyflakes "W", # pycodestyle warnings "B", # Bugbear "C4", # Comprehensions "UP", # Pyupgrade "SIM", # Simplify "I", # isort ] ignore = [ "E501", # Line length (handled by formatter) "I001", # Import sorting (conditional imports in try/except blocks) "SIM115", # LogManager owns file handles across its lifetime ] [tool.mypy] python_version = "3.13" warn_return_any = false warn_unused_configs = true disallow_untyped_defs = false disallow_incomplete_defs = false ignore_missing_imports = true check_untyped_defs = false no_implicit_optional = true warn_redundant_casts = true warn_unused_ignores = false warn_no_return = true show_error_codes = true show_column_numbers = true pretty = true exclude = [ ".venv", "venv", ] [[tool.mypy.overrides]] module = [ "pynput.*", "requests.*", "win32gui.*", "win32process.*", "psutil.*", "AppKit.*", ] ignore_missing_imports = true [tool.pylint.main] py-version = "3.13" jobs = 4 persistent = true ignore = [ "venv", ".venv", "__pycache__", "build", "dist", ".git", ] ignore-paths = [ "^venv/.*", "^.venv/.*", "^build/.*", "^dist/.*", ] [tool.pylint.messages_control] disable = [ "R0902", # too-many-instance-attributes (KeyloggerConfig needs 8, Keylogger needs 9) "R0903", # too-few-public-methods (WindowTracker is a utility class) # Exception handling - intentional for robustness "W0718", # broad-exception-caught (defensive programming for keylogger stability) # Optional import false positives "E0606", # possibly-used-before-assignment (win32gui, psutil, win32process checked with 'if') "E0601", # used-before-assignment (NSWorkspace, subprocess checked before use) # Style preferences "C0111", # missing-docstring (some methods are self-explanatory) "C0103", # invalid-name "C0325", # superfluous-parens (yapf formatting) "R1732", # consider-using-with (LogManager owns file handles) "W0105", # pointless-string-statement (ASCII art) ] [tool.pylint.design] max-args = 8 max-attributes = 10 max-branches = 15 max-locals = 15 max-statements = 50