-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Use PEP 585 syntax everywhere #6681
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Diff from mypy_primer, showing the effect of this PR on open source code: black (https://github.com/psf/black)
+ src/blib2to3/pgen2/grammar.py:149:9: error: Returning Any from function declared to return "_P"
+ src/black/files.py:44:21: error: <nothing> has no attribute "resolve"
+ src/black_primer/cli.py:27:14: error: <nothing> has no attribute "strftime"
+ src/black/__init__.py:203:23: error: Need type annotation for "v"
+ src/black/__init__.py:809:12: error: Need type annotation for "then"
+ src/black/__init__.py:825:15: error: Need type annotation for "now"
+ src/black/__init__.py:865:12: error: Need type annotation for "then"
+ src/black/__init__.py:890:19: error: Need type annotation for "now"
+ src/black/__init__.py:1263:12: error: Need type annotation for "version"
+ src/blackd/__init__.py:124:16: error: Need type annotation for "then"
+ src/blackd/__init__.py:134:19: error: Need type annotation for "now"
isort (https://github.com/pycqa/isort)
+ isort/output.py:633: error: Need type annotation for "instance"
+ isort/output.py:635: error: Returning Any from function declared to return "_LineWithComments"
+ isort/main.py:546: error: "_T" has no attribute "value"
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/logging.py:498: error: Unused "type: ignore" comment
+ sphinx/util/__init__.py: note: In function "epoch_to_rfc1123":
+ sphinx/util/__init__.py:556:10: error: Need type annotation for "dt"
+ sphinx/builders/gettext.py:171:11: error: Unsupported left operand type for - (<nothing>)
+ sphinx/builders/gettext.py: note: In member "finish" of class "MessageCatalogBuilder":
+ sphinx/builders/gettext.py:268:22: error: <nothing> has no attribute "strftime"
+ sphinx/transforms/post_transforms/images.py: note: In member "match" of class "ImageConverter":
+ sphinx/transforms/post_transforms/images.py:205:13: error: "type" has no attribute "available"
+ sphinx/testing/fixtures.py:110: error: Unused "type: ignore" comment
+ sphinx/builders/html/__init__.py: note: In member "__new__" of class "Stylesheet":
+ sphinx/builders/html/__init__.py:92:16: error: Need type annotation for "self"
+ sphinx/builders/html/__init__.py: note: In member "__new__" of class "JavaScript":
+ sphinx/builders/html/__init__.py:117:16: error: Need type annotation for "self"
schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/models.py: note: In class "Interaction":
+ src/schemathesis/models.py:827: error: <nothing> has no attribute "isoformat"
+ src/schemathesis/cli/__init__.py: note: In member "format_options" of class "CommandWithCustomHelp":
+ src/schemathesis/cli/__init__.py:159: error: <nothing> has no attribute "value"
+ src/schemathesis/cli/__init__.py: note: At top level:
+ src/schemathesis/cli/__init__.py:192: error: Need type annotation for "item"
+ src/schemathesis/cli/__init__.py:386: error: Need type annotation for "item"
+ src/schemathesis/cli/__init__.py:402: error: Need type annotation for "item"
pandas (https://github.com/pandas-dev/pandas)
+ pandas/_typing.py:108: error: Type application has too few types (2 expected) [misc]
+ pandas/_libs/tslibs/timestamps.pyi:82: error: Return type "Timestamp" of "fromtimestamp" incompatible with return type "_S" in supertype "datetime" [override]
+ pandas/_libs/tslibs/timestamps.pyi:82: error: Signature of "fromtimestamp" incompatible with supertype "date" [override]
+ pandas/_libs/tslibs/timestamps.pyi:82: note: Superclass:
+ pandas/_libs/tslibs/timestamps.pyi:82: note: @classmethod
+ pandas/_libs/tslibs/timestamps.pyi:82: note: def [_S] fromtimestamp(cls, float) -> _S
+ pandas/_libs/tslibs/timestamps.pyi:82: note: Subclass:
+ pandas/_libs/tslibs/timestamps.pyi:82: note: @classmethod
+ pandas/_libs/tslibs/timestamps.pyi:82: note: def fromtimestamp(cls, t: float, tz: Optional[tzinfo] = ...) -> Timestamp
+ pandas/_libs/tslibs/timestamps.pyi:86: error: Return type "Timestamp" of "utcfromtimestamp" incompatible with return type "_S" in supertype "datetime" [override]
+ pandas/_libs/tslibs/timestamps.pyi:88: error: Signature of "today" incompatible with supertype "date" [override]
+ pandas/_libs/tslibs/timestamps.pyi:88: note: Superclass:
+ pandas/_libs/tslibs/timestamps.pyi:88: note: @classmethod
+ pandas/_libs/tslibs/timestamps.pyi:88: note: def [_S] today(cls) -> _S
+ pandas/_libs/tslibs/timestamps.pyi:88: note: Subclass:
+ pandas/_libs/tslibs/timestamps.pyi:88: note: @classmethod
+ pandas/_libs/tslibs/timestamps.pyi:88: note: def today(cls, tz: Union[tzinfo, str, None] = ...) -> Timestamp
+ pandas/_libs/tslibs/timestamps.pyi:90: error: Signature of "fromordinal" incompatible with supertype "date" [override]
+ pandas/_libs/tslibs/timestamps.pyi:90: note: Superclass:
+ pandas/_libs/tslibs/timestamps.pyi:90: note: @classmethod
+ pandas/_libs/tslibs/timestamps.pyi:90: note: def [_S] fromordinal(cls, int) -> _S
+ pandas/_libs/tslibs/timestamps.pyi:90: note: Subclass:
+ pandas/_libs/tslibs/timestamps.pyi:90: note: @classmethod
+ pandas/_libs/tslibs/timestamps.pyi:90: note: def fromordinal(cls, ordinal: int, freq: Union[str, Any, None] = ..., tz: Union[tzinfo, str, None] = ...) -> Timestamp
+ pandas/_libs/tslibs/timestamps.pyi:97: error: Return type "Timestamp" of "now" incompatible with return type "_S" in supertype "datetime" [override]
+ pandas/_libs/tslibs/timestamps.pyi:99: error: Return type "Timestamp" of "utcnow" incompatible with return type "_S" in supertype "datetime" [override]
+ pandas/_libs/tslibs/timestamps.pyi:104: error: Return type "Timestamp" of "fromisoformat" incompatible with return type "_S" in supertype "datetime" [override]
+ pandas/_libs/tslibs/timestamps.pyi:104: error: Return type "Timestamp" of "fromisoformat" incompatible with return type "_S" in supertype "date" [override]
+ pandas/core/dtypes/dtypes.py:189: error: Need type annotation for "self" [var-annotated]
+ pandas/core/dtypes/dtypes.py:1076: error: Need type annotation for "u" [var-annotated]
+ pandas/core/indexes/base.py:652: error: Need type annotation for "result" [var-annotated]
+ pandas/core/arrays/string_.py:352: error: Need type annotation for "new_string_array" [var-annotated]
+ pandas/core/arrays/sparse/array.py:527: error: Need type annotation for "new" [var-annotated]
+ pandas/core/indexes/range.py:169: error: Need type annotation for "result" [var-annotated]
+ pandas/core/indexes/multi.py:323: error: Need type annotation for "result" [var-annotated]
+ pandas/core/indexes/multi.py:332: error: Unused "type: ignore" comment
+ pandas/io/parsers/python_parser.py:222: error: "type" has no attribute "delimiter" [attr-defined]
+ pandas/core/generic.py:296: error: Need type annotation for "obj" [var-annotated]
+ pandas/compat/pickle_compat.py:216: error: Need type annotation for "obj" [var-annotated]
+ pandas/compat/pickle_compat.py:241: error: Need type annotation for "obj" [var-annotated]
+ pandas/tseries/holiday.py:379: error: Need type annotation for "calendar_class" [var-annotated]
+ pandas/tests/groupby/test_apply.py:800: error: <nothing> has no attribute "date" [attr-defined]
+ pandas/tests/groupby/test_apply.py:800: error: <nothing> has no attribute "time" [attr-defined]
+ pandas/plotting/_matplotlib/converter.py:452: error: Need type annotation for "dt" [var-annotated]
bokeh (https://github.com/bokeh/bokeh)
+ release/action.py: note: In member "__str__" of class "ActionReturn":
+ release/action.py:33:16: error: "type" has no attribute "ui" [attr-defined]
+ bokeh/palettes.py:372: error: Type application has too few types (2 expected) [misc]
+ release/stages.py:79: error: Type application has too few types (2 expected) [misc]
SinbadCogs (https://github.com/mikeshardmind/SinbadCogs)
+ rolemanagement/events.py:41: error: Need type annotation for "now"
+ scheduler/converters.py:96: error: Incompatible types in assignment (expression has type "timedelta", variable has type "datetime")
+ scheduler/converters.py:144: error: Incompatible types in assignment (expression has type "timedelta", variable has type "datetime")
+ modnotes/modnotes.py:148: error: <nothing> has no attribute "timestamp"
+ scheduler/tasks.py:75: error: Need type annotation for "initial"
+ scheduler/tasks.py:100: error: Need type annotation for "now"
+ scheduler/tasks.py:104: error: Returning Any from function declared to return "float"
+ scheduler/tasks.py:106: error: Returning Any from function declared to return "float"
+ scheduler/tasks.py:110: error: Need type annotation for "now"
+ scheduler/scheduler.py:759: error: Need type annotation for "now"
+ scheduler/scheduler.py:822: error: Need type annotation for "now"
manticore (https://github.com/trailofbits/manticore)
+ manticore/utils/helpers.py:185: error: Need type annotation for "now"
+ manticore/core/plugin.py:432: error: Incompatible types in assignment (expression has type "_S", variable has type "datetime")
+ manticore/core/plugin.py:436: error: Incompatible types in assignment (expression has type "_S", variable has type "datetime")
+ manticore/core/worker.py:361: error: Need type annotation for "now"
+ tests/native/test_linux.py:97: error: Need type annotation for "ex"
+ tests/native/test_linux.py:335: error: Need type annotation for "cm"
mkosi (https://github.com/systemd/mkosi)
+ mkosi/backend.py:138:17: error: Need type annotation for "entry" [var-annotated]
+ mkosi/backend.py:141:9: error: Returning Any from function declared to return "Distribution" [no-any-return]
+ mkosi/manifest.py:74:33: error: Incompatible types in assignment (expression has type "_S", variable has type "datetime") [assignment]
+ mkosi/manifest.py:112:27: error: Need type annotation for "installtime" [var-annotated]
+ mkosi/manifest.py:154:27: error: Need type annotation for "installtime" [var-annotated]
+ mkosi/__init__.py:4029:34: error: Unsupported left operand type for + (<nothing>) [operator]
+ mkosi/__init__.py:5418:14: error: Argument "type" to "add_argument" of "_ActionsContainer" has incompatible type "Callable[[str], Optional[SourceFileTransfer]]"; expected "Union[Callable[[str], Optional[_T]], FileType]" [arg-type]
+ mkosi/__init__.py:5427:14: error: Argument "type" to "add_argument" of "_ActionsContainer" has incompatible type "Callable[[str], Optional[SourceFileTransfer]]"; expected "Union[Callable[[str], Optional[_T]], FileType]" [arg-type]
+ mkosi/__init__.py:5804:13: error: Incompatible types in assignment (expression has type "Union[_T, Distribution, None]", variable has type "Optional[Distribution]") [assignment]
core (https://github.com/home-assistant/core)
+ homeassistant/util/dt.py:104: error: Returning Any from function declared to return "datetime" [no-any-return]
+ homeassistant/util/dt.py:104: error: <nothing> has no attribute "replace" [attr-defined]
+ homeassistant/setup.py:30: error: Need type annotation for "platform" [var-annotated]
+ homeassistant/config_entries.py:94: error: Need type annotation for "obj" [var-annotated]
- homeassistant/config_entries.py:95: error: "object" has no attribute "_value_" [attr-defined]
- homeassistant/config_entries.py:96: error: "object" has no attribute "_recoverable" [attr-defined]
+ homeassistant/helpers/entity.py:875: error: "object" has no attribute "unique_id" [attr-defined]
+ homeassistant/helpers/entity.py:879: error: "object" has no attribute "platform" [attr-defined]
+ homeassistant/helpers/entity.py:880: error: "object" has no attribute "platform" [attr-defined]
+ homeassistant/helpers/entity.py:883: error: "object" has no attribute "platform" [attr-defined]
+ homeassistant/helpers/entity.py:886: error: Returning Any from function declared to return "bool" [no-any-return]
+ homeassistant/helpers/entity.py:886: error: "object" has no attribute "unique_id" [attr-defined]
+ homeassistant/components/sensor/__init__.py:170: error: Need type annotation for "cls" [var-annotated]
+ homeassistant/components/sensor/__init__.py:194: error: Need type annotation for "cls" [var-annotated]
+ homeassistant/components/switch/__init__.py:58: error: Need type annotation for "cls" [var-annotated]
+ homeassistant/components/starline/account.py:44: error: <nothing> has no attribute "timestamp" [attr-defined]
+ homeassistant/components/starline/account.py:144: error: <nothing> has no attribute "isoformat" [attr-defined]
+ homeassistant/components/nina/__init__.py:106: error: <nothing> has no attribute "astimezone" [attr-defined]
+ homeassistant/components/mysensors/helpers.py:179: error: Need type annotation for "member" [var-annotated]
+ homeassistant/components/mysensors/helpers.py:179: error: Item "str" of "Optional[str]" has no attribute "name" [union-attr]
+ homeassistant/components/mysensors/helpers.py:179: error: Item "None" of "Optional[str]" has no attribute "name" [union-attr]
+ homeassistant/components/mysensors/helpers.py:179: error: Item "str" of "Optional[str]" has no attribute "value" [union-attr]
+ homeassistant/components/mysensors/helpers.py:179: error: Item "None" of "Optional[str]" has no attribute "value" [union-attr]
+ homeassistant/components/mysensors/helpers.py:186: error: Need type annotation for "member" [var-annotated]
+ homeassistant/components/mysensors/helpers.py:200: error: Need type annotation for "member" [var-annotated]
+ homeassistant/components/mysensors/helpers.py:223: error: <nothing> has no attribute "value" [attr-defined]
+ homeassistant/components/cover/__init__.py:69: error: Need type annotation for "cls" [var-annotated]
+ homeassistant/components/binary_sensor/__init__.py:120: error: Need type annotation for "cls" [var-annotated]
+ homeassistant/components/vicare/__init__.py:65: error: Need type annotation for "e" [var-annotated]
+ homeassistant/components/vallox/sensor.py:106: error: <nothing> has no attribute "replace" [attr-defined]
+ homeassistant/components/vallox/sensor.py:108: error: Returning Any from function declared to return "Union[Union[None, str, int, float], datetime]" [no-any-return]
+ homeassistant/components/todoist/calendar.py:235: error: <nothing> has no attribute "replace" [attr-defined]
+ homeassistant/components/media_player/__init__.py:158: error: Need type annotation for "cls" [var-annotated]
+ homeassistant/components/stream/worker.py:123: error: Need type annotation for "_start_time" [var-annotated]
+ homeassistant/components/vicare/config_flow.py:51: error: Need type annotation for "e" [var-annotated]
+ homeassistant/components/androidtv/media_player.py:426: error: <nothing> has no attribute "timestamp" [attr-defined]
+ homeassistant/components/netatmo/media_source.py:80: error: Need type annotation for "created" [var-annotated]
mypy (https://github.com/python/mypy)
+ mypy/typestate.py:19: error: Type application has too few types (2 expected) [misc]
+ mypy/server/astdiff.py:74: error: Type application has too few types (2 expected) [misc]
+ mypy/literals.py:85: error: Type application has too few types (2 expected) [misc]
+ mypyc/transform/refcount.py:36: error: Type application has too few types (2 expected) [misc]
+ mypyc/transform/refcount.py:37: error: Type application has too few types (2 expected) [misc]
+ mypyc/codegen/emitwrapper.py:80: error: Need type annotation for "k" [var-annotated]
+ mypy/test/teststubgen.py:1045: error: Need type annotation for "e" [var-annotated]
tornado (https://github.com/tornadoweb/tornado)
+ tornado/util.py:276: error: Need type annotation for "instance"
+ tornado/locale.py:349: error: Need type annotation for "now"
+ tornado/locale.py:359: error: Unsupported operand types for - ("int" and "timedelta")
+ tornado/locale.py:359: error: Unsupported operand types for - ("float" and "timedelta")
+ tornado/locale.py:359: note: Left operand is of type "Union[int, float, datetime]"
+ tornado/web.py:633: error: Incompatible types in assignment (expression has type "timedelta", variable has type "Union[float, Tuple[Any, ...], datetime, None]")
+ tornado/web.py:663: error: Argument "expires" to "set_cookie" of "RequestHandler" has incompatible type "timedelta"; expected "Union[float, Tuple[Any, ...], datetime, None]"
+ tornado/web.py:2688: error: Argument 2 to "set_header" of "RequestHandler" has incompatible type "timedelta"; expected "Union[bytes, str, int, Integral, datetime]"
+ tornado/web.py:2877: error: Need type annotation for "modified"
bandersnatch (https://github.com/pypa/bandersnatch)
+ src/bandersnatch/utils.py: note: In function "make_time_stamp":
+ src/bandersnatch/utils.py:42: error: <nothing> has no attribute "isoformat"
- src/bandersnatch_storage_plugins/swift.py:297: error: "SwiftPath" has no attribute "_drv"
- src/bandersnatch_storage_plugins/swift.py:298: error: "SwiftPath" has no attribute "_root"
- src/bandersnatch_storage_plugins/swift.py:299: error: "SwiftPath" has no attribute "_parts"
- src/bandersnatch_storage_plugins/swift.py: note: At top level:
- src/bandersnatch_storage_plugins/swift.py:302: error: Unused "type: ignore" comment
+ src/bandersnatch_storage_plugins/swift.py:295: error: Need type annotation for "self"
- src/bandersnatch_storage_plugins/swift.py:309: error: "SwiftPath" has no attribute "_drv"
+ src/bandersnatch_storage_plugins/swift.py:308: error: Need type annotation for "self"
+ src/bandersnatch_storage_plugins/swift.py: note: In member "update_timestamp" of class "SwiftStorage":
- src/bandersnatch_storage_plugins/swift.py:310: error: "SwiftPath" has no attribute "_root"
+ src/bandersnatch_storage_plugins/swift.py:917: error: <nothing> has no attribute "timestamp"
+ src/bandersnatch/mirror.py: note: In member "wrapup_successful_sync" of class "BandersnatchMirror":
+ src/bandersnatch/mirror.py:515: error: Statement is unreachable
- src/bandersnatch_storage_plugins/swift.py:311: error: "SwiftPath" has no attribute "_parts"
- src/bandersnatch_storage_plugins/swift.py: note: At top level:
- src/bandersnatch_storage_plugins/swift.py:314: error: Unused "type: ignore" comment
streamlit (https://github.com/streamlit/streamlit)
+ scripts/add_license_headers.py:44:13: error: <nothing> has no attribute "year" [attr-defined]
+ lib/streamlit/string_util.py: note: In function "append_date_time_to_string":
+ lib/streamlit/string_util.py:99:11: error: Need type annotation for "now" [var-annotated]
+ lib/streamlit/string_util.py:102:9: error: Returning Any from function declared to return "str" [no-any-return]
+ lib/streamlit/config_option.py: note: In member "is_expired" of class "ConfigOption":
+ lib/streamlit/config_option.py:285:15: error: Need type annotation for "now" [var-annotated]
+ lib/streamlit/config_option.py:286:9: error: Returning Any from function declared to return "bool" [no-any-return]
+ lib/streamlit/state/session_state.py:70: error: Type application has too few types (2 expected) [misc]
+ lib/streamlit/elements/time_widgets.py: note: In member "time_input" of class "TimeWidgetsMixin":
+ lib/streamlit/elements/time_widgets.py:92:21: error: <nothing> has no attribute "time" [attr-defined]
+ lib/streamlit/elements/time_widgets.py: note: In member "date_input" of class "TimeWidgetsMixin":
+ lib/streamlit/elements/time_widgets.py:208:21: error: <nothing> has no attribute "date" [attr-defined]
+ lib/tests/streamlit/legacy_caching/hashing_test.py: note: In member "test_hashing_broken_code" of class "HashTest":
+ lib/tests/streamlit/legacy_caching/hashing_test.py:226:18: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/caching/memo_test.py:131:14: error: Need type annotation for "error" [var-annotated]
+ lib/tests/streamlit/caching/memo_test.py:137:14: error: Need type annotation for "e" [var-annotated]
+ scripts/pypi_nightly_create_tag.py: note: In function "create_tag":
+ scripts/pypi_nightly_create_tag.py:46:11: error: <nothing> has no attribute "strftime" [attr-defined]
+ lib/tests/streamlit/time_input_test.py: note: In member "test_just_label" of class "TimeInputTest":
+ lib/tests/streamlit/time_input_test.py:34:59: error: <nothing> has no attribute "time" [attr-defined]
+ lib/tests/streamlit/text_input_test.py: note: In member "test_input_types" of class "TextInputTest":
+ lib/tests/streamlit/text_input_test.py:69:14: error: Need type annotation for "exc" [var-annotated]
+ lib/tests/streamlit/streamlit_test.py: note: In member "test_st_image_bad_width" of class "StreamlitAPITest":
+ lib/tests/streamlit/streamlit_test.py:505:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/metric_test.py: note: In member "test_invalid_label" of class "MetricTest":
+ lib/tests/streamlit/metric_test.py:152:14: error: Need type annotation for "exc" [var-annotated]
+ lib/tests/streamlit/metric_test.py: note: In member "test_invalid_value" of class "MetricTest":
+ lib/tests/streamlit/metric_test.py:162:14: error: Need type annotation for "exc" [var-annotated]
+ lib/tests/streamlit/metric_test.py: note: In member "test_invalid_delta" of class "MetricTest":
+ lib/tests/streamlit/metric_test.py:172:14: error: Need type annotation for "exc" [var-annotated]
+ lib/tests/streamlit/metric_test.py: note: In member "test_invalid_delta_color" of class "MetricTest":
+ lib/tests/streamlit/metric_test.py:182:14: error: Need type annotation for "exc" [var-annotated]
+ lib/tests/streamlit/map_test.py: note: In member "test_missing_column" of class "StMapTest":
+ lib/tests/streamlit/map_test.py:83:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/map_test.py: note: In member "test_nan_exception" of class "StMapTest":
+ lib/tests/streamlit/map_test.py:91:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/form_test.py: note: In member "test_multiple_forms_same_key" of class "FormMarshallingTest":
+ lib/tests/streamlit/form_test.py:197:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/form_test.py: note: In member "test_form_in_form" of class "FormMarshallingTest":
+ lib/tests/streamlit/form_test.py:218:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/form_test.py: note: In member "test_button_in_form" of class "FormMarshallingTest":
+ lib/tests/streamlit/form_test.py:228:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/form_test.py: note: In member "test_submit_button_outside_form" of class "FormSubmitButtonTest":
+ lib/tests/streamlit/form_test.py:250:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/delta_generator_test.py: note: In member "test_nonexistent_method" of class "DeltaGeneratorTest":
+ lib/tests/streamlit/delta_generator_test.py:128:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/delta_generator_test.py: note: In member "test_sidebar_nonexistent_method" of class "DeltaGeneratorTest":
+ lib/tests/streamlit/delta_generator_test.py:136:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/delta_generator_test.py: note: In member "test_duplicate_widget_id_error" of class "DeltaGeneratorTest":
+ lib/tests/streamlit/delta_generator_test.py:168:18: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/delta_generator_test.py: note: In member "test_unequal_images_and_captions_error" of class "DeltaGeneratorImageTest":
+ lib/tests/streamlit/delta_generator_test.py:585:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/date_input_test.py: note: In member "test_just_label" of class "DateInputTest":
+ lib/tests/streamlit/date_input_test.py:39:65: error: <nothing> has no attribute "date" [attr-defined]
- lib/tests/streamlit/date_input_test.py:171:16: error: Non-overlapping equality check (left operand type: "Union[date, Tuple[date, ...]]", right operand type: "List[datetime]") [comparison-overlap]
+ lib/tests/streamlit/date_input_test.py:171:16: error: Non-overlapping equality check (left operand type: "Union[date, Tuple[date, ...]]", right operand type: "List[timedelta]") [comparison-overlap]
+ lib/tests/streamlit/components_test.py: note: In member "test_register_invalid_path" of class "ComponentRegistryTest":
+ lib/tests/streamlit/components_test.py:191:14: error: Need type annotation for "ctx" [var-annotated]
+ lib/tests/streamlit/state/session_state_test.py: note: In member "test_date_input_serde" of class "SessionStateSerdeTest":
+ lib/tests/streamlit/state/session_state_test.py:295:20: error: <nothing> has no attribute "date" [attr-defined]
+ lib/tests/streamlit/state/session_state_test.py: note: In member "test_slider_serde" of class "SessionStateSerdeTest":
+ lib/tests/streamlit/state/session_state_test.py:392:19: error: <nothing> has no attribute "time" [attr-defined]
+ lib/tests/streamlit/legacy_caching/caching_test.py: note: In member "test_unhashable_type" of class "CacheErrorsTest":
+ lib/tests/streamlit/legacy_caching/caching_test.py:512:14: error: Need type annotation for "cm" [var-annotated]
+ lib/tests/streamlit/legacy_caching/caching_test.py: note: In member "test_hash_funcs_acceptable_keys" of class "CacheErrorsTest":
+ lib/tests/streamlit/legacy_caching/caching_test.py:568:14: error: Need type annotation for "cm" [var-annotated]
+ lib/tests/streamlit/legacy_caching/caching_test.py: note: In member "test_user_hash_error" of class "CacheErrorsTest":
+ lib/tests/streamlit/legacy_caching/caching_test.py:585:14: error: Need type annotation for "cm" [var-annotated]
+ lib/tests/streamlit/commands/page_config_test.py:51:14: error: Need type annotation for "e" [var-annotated]
+ lib/tests/streamlit/commands/page_config_test.py:80:14: error: Need type annotation for "e" [var-annotated]
+ lib/tests/streamlit/commands/page_config_test.py:94:14: error: Need type annotation for "e" [var-annotated]
+ lib/tests/streamlit/caching/cache_errors_test.py:70:14: error: Need type annotation for "cm" [var-annotated]
paasta (https://github.com/yelp/paasta)
+ paasta_tools/utils.py:1414: error: <nothing> has no attribute "isoformat"
+ paasta_tools/autoscaling/load_boost.py:202: error: <nothing> has no attribute "strftime"
+ paasta_tools/kubernetes_tools.py:2002: error: <nothing> has no attribute "timestamp"
+ paasta_tools/kubernetes_tools.py:2437: error: Need type annotation for "s"
+ paasta_tools/kubernetes_tools.py:2655: error: <nothing> has no attribute "timestamp"
+ paasta_tools/mesos_tools.py:326: error: Need type annotation for "first_status_datetime"
+ paasta_tools/mesos_tools.py:374: error: <nothing> has no attribute "strftime"
+ paasta_tools/cli/cmds/status.py:608: error: Need type annotation for "create_datetime"
+ paasta_tools/cli/cmds/status.py:676: error: Need type annotation for "local_deployed_datetime"
+ paasta_tools/cli/cmds/status.py:940: error: Unsupported left operand type for - (<nothing>)
+ paasta_tools/cli/cmds/status.py:1115: error: Need type annotation for "start_time"
+ paasta_tools/cli/cmds/status.py:1288: error: Need type annotation for "start_datetime"
+ paasta_tools/cli/cmds/status.py:1299: error: Need type annotation for "state"
+ paasta_tools/cli/cmds/status.py:1406: error: <nothing> has no attribute "timestamp"
+ paasta_tools/cli/cmds/status.py:1452: error: Need type annotation for "start_datetime"
+ paasta_tools/cli/cmds/status.py:1474: error: Need type annotation for "timestamp"
+ paasta_tools/cli/cmds/status.py:1512: error: <nothing> has no attribute "timestamp"
+ paasta_tools/cli/cmds/status.py:1519: error: <nothing> has no attribute "timestamp"
+ paasta_tools/cli/cmds/status.py:1644: error: Need type annotation for "create_datetime"
+ paasta_tools/cli/cmds/status.py:1812: error: Unsupported left operand type for - (<nothing>)
+ paasta_tools/cli/cmds/logs.py:1024: error: <nothing> has no attribute "replace"
+ paasta_tools/cli/cmds/logs.py:1192: error: Need type annotation for "end_time"
+ paasta_tools/cli/cmds/logs.py:1223: error: Incompatible types in assignment (expression has type "datetime", variable has type "timedelta")
+ paasta_tools/cli/cmds/logs.py:1223: error: Argument 1 to "localize" of "_UTCclass" has incompatible type "timedelta"; expected "datetime"
+ paasta_tools/cli/cmds/logs.py:1229: error: Incompatible return value type (got "Tuple[timedelta, Any]", expected "Tuple[datetime, datetime]")
+ paasta_tools/cli/cmds/list_deploy_queue.py:168: error: Need type annotation for "datetime_obj"
+ paasta_tools/api/views/instance.py:575: error: <nothing> has no attribute "strftime"
git-revise (https://github.com/mystor/git-revise)
+ gitrevise/odb.py:57: error: Return type "Oid" of "fromhex" incompatible with return type "_T" in supertype "bytes"
+ gitrevise/odb.py:387: error: Need type annotation for "abbrev"
+ gitrevise/odb.py:484: error: Need type annotation for "self"
|
Closing this; will open a new PR without lowercase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will probably be easiest to review commit by commit.
The script I used to apply these changes is as follows:
Note: this doesn't touch any classes from
collections.abc
. I probably could have done them in this PR as well, but I haven't.