googleapis / googleapis/google-cloud-python

Type safety issues

Offen
#14,148 0 Kommentare 1 Reaktion 1 zugewiesene Person Beansprucht von @nidhiii-27 Auf GitHub ansehen
api: storage priority: p3 type: bug
Vorherrschende Sprache
Python
Sterne
5.4k
Forks
1.8k
Ø Merge
3 T. 4 Std.
Gemergte PRs (30 T.)
122

Beschreibung

### Determine this is the right repository

- [x] I determined this is the correct repository in which to report this bug.

### Summary of the issue

Using VSCode or Cursor.ai editor, with everything set up (type checking strict, ruff linter and pyright) the project has
- no py.typed file
- Functions with no annotated return value
- no type stubs

Which means the editor complains and all code which touches this library is lit up red, making it hard to tell real issues from GCP python library issues.

Google has vast resources, they can afford to take due diligence and follow mainstream best practices in software development lifecycle, which includes making sure type safety works.

Please annotate your return types and make a py.typed file.

I am using python 3.13.4 and `google-cloud-storage==3.2.0`

### API client name and version

google-cloud-storage==3.2.0

### Reproduction steps: code

`.vscode/settings.json`

```json
{
"python.analysis.typeCheckingMode": "strict"
}
```

With the Python and Pylance extensions installed. Even the `pyrightconfig.json` does not help:

```json
{
"typeCheckingMode": "strict",
"pythonVersion": "3.13",
"analyzeUnannotatedFunctions": true,
"useLibraryCodeForTypes": true,
"reportMissingTypeStubs": false
}
```

### Reproduction steps: supporting files

-

### Reproduction steps: actual results

Already given

### Reproduction steps: expected results

I expect that libraries function with type safety and do not cause errors just by importing them.

### OS & version + platform

_No response_

### Python environment

3.13.4

### Python dependencies

$ pip freeze | grep -i google
google-api-core==2.25.1
google-auth==2.40.3
google-cloud-core==2.4.3
google-cloud-storage==3.2.0
google-crc32c==1.7.1
google-resumable-media==2.7.2
googleapis-common-protos==1.70.0

### Additional context

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.