|
| 1 | +[build-system] |
| 2 | +requires = ['hatchling', 'hatch-vcs'] |
| 3 | +build-backend = 'hatchling.build' |
| 4 | + |
| 5 | +[project] |
| 6 | +name = 'inject' |
| 7 | +dynamic = ['version'] |
| 8 | +description = 'Python dependency injection framework.' |
| 9 | +license='Apache-2.0' |
| 10 | +readme = 'README.md' |
| 11 | +authors = [ |
| 12 | + { name = 'Ivan Korobkov', email = '[email protected]' }, |
| 13 | +] |
| 14 | +maintainers = [ |
| 15 | + { name = 'Ivan Korobkov', email = '[email protected]' }, |
| 16 | +] |
| 17 | +classifiers = [ |
| 18 | + 'Development Status :: 5 - Production/Stable', |
| 19 | + 'Intended Audience :: Developers', |
| 20 | + 'License :: OSI Approved :: Apache Software License', |
| 21 | + 'Operating System :: OS Independent', |
| 22 | + 'Programming Language :: Python', |
| 23 | + 'Programming Language :: Python :: 3.6', |
| 24 | + 'Programming Language :: Python :: 3.7', |
| 25 | + 'Programming Language :: Python :: 3.8', |
| 26 | + 'Programming Language :: Python :: 3.9', |
| 27 | + 'Programming Language :: Python :: 3.10', |
| 28 | + 'Programming Language :: Python :: 3.11', |
| 29 | + 'Topic :: Software Development :: Libraries :: Python Modules', |
| 30 | +] |
| 31 | +dependencies = [ |
| 32 | +] |
| 33 | + |
| 34 | +[project.scripts] |
| 35 | + |
| 36 | +[project.urls] |
| 37 | +Homepage = 'https://github.com/ivankorobkov/python-inject' |
| 38 | + |
| 39 | +[tool.black] |
| 40 | +line-length = 120 |
| 41 | +skip-string-normalization = true |
| 42 | +target_version = ['py39', 'py310', 'py311'] |
| 43 | +include = '\.pyi?$' |
| 44 | +exclude = ''' |
| 45 | +/( |
| 46 | + \.eggs |
| 47 | + | \.git |
| 48 | + | \.github |
| 49 | + | \.hg |
| 50 | + | \.idea |
| 51 | + | \.mypy_cache |
| 52 | + | \.tox |
| 53 | + | \.pyre_configuration |
| 54 | + | \.venv |
| 55 | + | _build |
| 56 | + | build |
| 57 | + | dist |
| 58 | + | var |
| 59 | +) |
| 60 | +''' |
| 61 | + |
| 62 | +[tool.hatch.build.hooks.vcs] |
| 63 | +version-file = 'src/inject/_version.py' |
| 64 | + |
| 65 | +[tool.hatch.build.targets.wheel] |
| 66 | +packages = [ |
| 67 | + 'src/inject', |
| 68 | +] |
| 69 | + |
| 70 | +[tool.hatch.build.targets.wheel.force-include] |
| 71 | +'typeshed/pyi/inject' = 'typeshed/pyi/inject' |
| 72 | + |
| 73 | +[tool.hatch.build.targets.wheel.shared-data] |
| 74 | + |
| 75 | +[tool.hatch.version] |
| 76 | +source = 'vcs' |
| 77 | + |
| 78 | +[tool.isort] |
| 79 | +case_sensitive = true |
| 80 | +include_trailing_comma = true |
| 81 | +line_length = 120 |
| 82 | +multi_line_output = 3 |
| 83 | +profile = 'black' |
| 84 | + |
| 85 | +[tool.mypy] |
| 86 | +check_untyped_defs = true |
| 87 | +disallow_any_generics = true |
| 88 | +disallow_incomplete_defs = true |
| 89 | +disallow_subclassing_any = true |
| 90 | +disallow_untyped_calls = true |
| 91 | +disallow_untyped_decorators = true |
| 92 | +disallow_untyped_defs = true |
| 93 | +ignore_missing_imports = true |
| 94 | +mypy_path = ['typeshed/pyi'] |
| 95 | +no_implicit_optional = true |
| 96 | +python_version = '3.11' |
| 97 | +warn_redundant_casts = true |
| 98 | +warn_return_any = true |
| 99 | +warn_unused_configs = true |
| 100 | +warn_unused_ignores = true |
| 101 | + |
| 102 | +[tool.pyright] |
| 103 | +defineConstant = { DEBUG = true } |
| 104 | +exclude = [] |
| 105 | +executionEnvironments = [] |
| 106 | +ignore = [] |
| 107 | +include = [ |
| 108 | + 'src/inject', |
| 109 | + 'test', |
| 110 | +] |
| 111 | +pythonPlatform = 'Linux' |
| 112 | +pythonVersion = '3.11' |
| 113 | +reportMissingImports = true |
| 114 | +reportMissingTypeStubs = false |
| 115 | +stubPath = 'typeshed/import' |
| 116 | + |
| 117 | +[tool.pytest.ini_options] |
| 118 | +addopts = '-rfEX --strict-markers --tb=long' |
| 119 | +minversion = '7.2' |
| 120 | +python_files = [ |
| 121 | + 'test_*.py', |
| 122 | +] |
| 123 | +testpaths = [ |
| 124 | + './test', |
| 125 | +] |
| 126 | + |
| 127 | +[tool.ruff] |
| 128 | +ignore = [ |
| 129 | + # Allow non-abstract empty methods in abstract base classes |
| 130 | + 'B027', |
| 131 | + # Allow boolean positional values in function calls, like `dict.get(... True)` |
| 132 | + 'FBT003', |
| 133 | + # Ignore checks for possible passwords |
| 134 | + 'S105', 'S106', 'S107', |
| 135 | + # Ignore complexity |
| 136 | + 'C901', 'PLR0911', 'PLR0912', 'PLR0913', 'PLR0915', |
| 137 | + 'PLC1901', # empty string comparisons |
| 138 | + 'PLW2901', # `for` loop variable overwritten |
| 139 | + 'SIM114', # Combine `if` branches using logical `or` operator |
| 140 | +] |
| 141 | +line-length = 120 |
| 142 | +select = [ |
| 143 | + 'A', |
| 144 | + 'B', |
| 145 | + 'C', |
| 146 | + 'DTZ', |
| 147 | + 'E', |
| 148 | + 'EM', |
| 149 | + 'F', |
| 150 | + 'FBT', |
| 151 | + 'I', |
| 152 | + 'ICN', |
| 153 | + 'ISC', |
| 154 | + 'N', |
| 155 | + 'PLC', |
| 156 | + 'PLE', |
| 157 | + 'PLR', |
| 158 | + 'PLW', |
| 159 | + 'Q', |
| 160 | + 'RUF', |
| 161 | + 'S', |
| 162 | + 'SIM', |
| 163 | + 'T', |
| 164 | + 'TID', |
| 165 | + 'UP', |
| 166 | + 'W', |
| 167 | + 'YTT', |
| 168 | +] |
| 169 | +target-version = ['py39', 'py310', 'py311'] |
| 170 | +unfixable = [ |
| 171 | + # Don't touch unused imports |
| 172 | + 'F401', |
| 173 | +] |
| 174 | + |
| 175 | +[tool.ruff.flake8-quotes] |
| 176 | +inline-quotes = 'single' |
| 177 | + |
| 178 | +[tool.ruff.flake8-tidy-imports] |
| 179 | +ban-relative-imports = 'all' |
| 180 | + |
| 181 | +[tool.ruff.isort] |
| 182 | +known-first-party = [ |
| 183 | + 'inject', |
| 184 | +] |
| 185 | + |
| 186 | +[tool.ruff.per-file-ignores] |
| 187 | +# Tests can use magic values, assertions, and relative imports |
| 188 | +'/**/test_*.py' = ['PLR2004', 'S101', 'TID252'] |
0 commit comments