NOAA-EMC / wxflow

Tools for Weather Workflows
https://wxflow.readthedocs.io/en/latest
GNU Lesser General Public License v3.0
0 stars 7 forks source link

Syntax error in schema #11

Closed WalterKolczynski-NOAA closed 6 months ago

WalterKolczynski-NOAA commented 1 year ago

Expected behavior Code should pass pynorm check.

Current behavior pynorm fails due to a syntax error in schema.py:

src/wxflow/schema.py:609:46: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`

Machines affected N/A

To Reproduce

  1. Run pycodenorm GH action

Context First reported by @jkhender (in global-workflow before the script was moved).

Script previously passed the check, so this seems like an update to pycodenorms.

Detailed Description

Additional Information

Possible Implementation Offending line should be changed to

                elif flavor == VALIDATOR and isinstance(s, Regex):
aerorahul commented 6 months ago

fixed by #15