Skip to content

Pylint on Timestamp and Duration fields failing #9730

@lzchen

Description

@lzchen

What version of protobuf and what language are you using?
Version: v3.20.0
Language: Python

What operating system (Linux, Windows, ...) and version?
Linux

What runtime / compiler are you using (e.g., python version or gcc version)
Python 3.9.12

What did you do?
Run Pylint on a Python file which imports from google.protobuf.duration_pb2 import Duration
or from google.protobuf.duration_pb2 import Timestamp

What did you expect to see
Pylint passing with no errors.

What did you see instead?
E0611: No name 'Timestamp' in module 'google.protobuf.timestamp_pb2' (no-name-in-module)
E0611: No name 'Duration' in module 'google.protobuf.duration_pb2' (no-name-in-module)

On the CHANGELOGs I see "Fix type annotations of some Duration and Timestamp methods." as part of the release but not sure if or how it affects Pylint behavior.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions