Skip to content

Commit

Permalink
feat: detect piped union
Browse files Browse the repository at this point in the history
This allows vermin to correctly warn us if we are using the pipe union syntax. Useful to prevent issues like #5912 in the future. In addition, self-documenting fstrings will be reporteed. Both of these features are labelled as "unstable"; if vermin ever produces a false positive, we can re-consider the inclusion of these features.

For example, it would have produced the following error:

```
Detecting python files..
Analyzing 247 files using 24 processes..
!2, 3.10     /home/devin/dev/deephaven/deephaven-core/py/server/deephaven/_table_reader.py
  union types as `X | Y` require !2, 3.10

Minimum required versions: 3.10
Incompatible versions:     2
Target versions not met:   3.8
```

Here is the documentation for these feature flags:

```
  [--feature <name>] ...
        Some features are disabled by default due to being unstable:
          fstring-self-doc - [Unstable] Detect self-documenting fstrings. Can in
                             some cases wrongly report fstrings as self-documenting.
          union-types      - [Unstable] Detect union types `X | Y`. Can in some cases
                             wrongly report union types due to having to employ heuristics.
```
  • Loading branch information
devinrsmith committed Aug 7, 2024
1 parent 3bd5587 commit cfaa5c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/quick-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
run: pip install vermin==1.6.0

- name: Verify minimum version support
run: vermin -t=3.8 --no-tips --eval-annotations --violations py/server/deephaven py/client py/client-ticking py/embedded-server
run: vermin -t=3.8 --no-tips --eval-annotations --violations --feature fstring-self-doc --feature union-types py/server/deephaven py/client py/client-ticking py/embedded-server

0 comments on commit cfaa5c0

Please sign in to comment.