Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/google-cloud-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: retnikt/google-cloud-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 22, 2019

  1. Fix typing - :type kwargs: dict is not correct

    When typing Python code, the special `*args` and `**kwargs` params are typed based on their contents, e.g.
    ```python
    def foo(thing: int, *args: str):
        ...
    def bar(thing: int, *args: str, **kwargs: Union[int, float]):
        ...
    
    bar(-3, "G", spam=80, eggs=4.4)
    foo(44, "abc", "xyz")```
    
    And in this case, the types are passed to a different func (`Query.__init__`) which has specific arguments, so it is best to not give **kwargs a type, or, better, copy the parameters of that function (but I haven't done this here).
    This also applies to `Transaction`.
    PS I know this is a stupidly minor change but it annoys me, having to write `noinspection PyTypeChecker` before every datastore query.
    :smile:
    retnikt authored Feb 22, 2019
    Configuration menu
    Copy the full SHA
    b9dee2c View commit details
    Browse the repository at this point in the history
Loading