-
Notifications
You must be signed in to change notification settings - Fork 139
Added initial typehints #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
3603881
2414d2a
4813578
57d5945
eb58125
93194dc
9ef5009
158f79e
2312565
a8102b7
83434fc
a02b8c0
1a3c08d
e15edf1
6318c76
3fe9121
f347608
50e8438
fba47bd
944c701
2557198
98944e5
ed68dc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,6 @@ | |
| classifiers = [ | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
|
|
@@ -39,19 +38,36 @@ | |
| "Topic :: System :: Logging", | ||
| "Topic :: System :: Monitoring", | ||
| ] | ||
| requires-python = ">=3.9" | ||
| requires-python = ">=3.10" | ||
| dependencies = [ | ||
| "requests>=0.12.1", | ||
| "typing_extensions; python_version < \"3.11\"" | ||
| ] | ||
|
|
||
| [dependency-groups] | ||
| test = [ | ||
| "blinker", | ||
| "httpx", | ||
| "pytest", | ||
| "python-multipart", | ||
| "webob", | ||
|
Check warning on line 53 in pyproject.toml
|
||
|
Comment on lines
47
to
53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Test file Extended reasoning...What the bug isThis PR's test = ["blinker", "httpx", "pytest", "python-multipart", "webob"]No Why it works today (and the refutation)A refuting verifier correctly pointed out that pytest declares Why it's still worth flaggingThe same PR explicitly applied the opposite convention one section above: it added Relying on transitive dependencies for direct imports is a well-known anti-pattern (PEP 508 / packaging best practices). The failure mode is small but real: if pytest ever drops its packaging dep (theoretical, but not impossible across major-version bumps), or if a downstream user installs the test target with a minimal resolver, the import fails at collection time because the import is at module scope and pytest evaluates it before any How to fixSingle-line change in test = [
"blinker",
"httpx",
"packaging",
"pytest",
"python-multipart",
"webob",
]Step-by-step proof
|
||
| ] | ||
|
|
||
| type = [ | ||
| "bottle", | ||
| "djangorestframework-stubs[compatible-mypy]", | ||
| "django-stubs", | ||
| "fastapi", | ||
| "mypy ~= 1.20.2", | ||
| "pyramid", | ||
| "quart", | ||
| "sanic", | ||
| "starlette", | ||
| "tornado", | ||
| "twisted", | ||
| "uvicorn", | ||
| ] | ||
|
danielmorell marked this conversation as resolved.
|
||
|
|
||
| [project.urls] | ||
| Homepage = "https://rollbar.com/" | ||
| Documentation = "https://docs.rollbar.com/docs/python" | ||
|
|
@@ -64,6 +80,9 @@ | |
| [project.entry-points."paste.filter_app_factory"] | ||
| pyramid = "rollbar.contrib.pyramid:create_rollbar_middleware" | ||
|
|
||
| [tool.mypy] | ||
| packages = ["rollbar"] | ||
|
|
||
| [tool.pytest] | ||
| testpaths = [ | ||
| "rollbar/test", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.