File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This program is licensed under the Apache License 2.0.
2+ # See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0> for full license details.
Original file line number Diff line number Diff line change 2222 - name : Build docker
2323 run : docker build . -t header-validator:py3.8.13-alpine
2424 - name : Run action
25- run : docker run --workdir /github/workspace -v "/home/runner/work/validate-python-headers/validate-python-headers":"/github/workspace" header-validator:py3.8.13-alpine 'François-Guillaume Fernandez' 2022 Apache-2.0 src/ __init__.py .github/ ''
25+ run : |
26+ docker run --workdir /github/workspace -v "/home/runner/work/validate-python-headers/validate-python-headers":"/github/workspace" header-validator:py3.8.13-alpine 'François-Guillaume Fernandez' 2022 Apache-2.0 src/ __init__.py .github/ ''
27+ docker run --workdir /github/workspace -v "/home/runner/work/validate-python-headers/validate-python-headers":"/github/workspace" header-validator:py3.8.13-alpine 'François-Guillaume Fernandez' 2022 '' src/ __init__.py .github/ .github/license-notice.txt
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def get_header_options(
3434
3535 # License check
3636 license_notices = []
37- if isinstance (license_id , str ):
37+ if isinstance (license_id , str ) and len ( license_id ) > 0 :
3838 license_info = LICENSES .get (license_id )
3939 if not isinstance (license_info , dict ):
4040 raise KeyError (f"Invalid license identifier: { license_id } " )
@@ -48,7 +48,7 @@ def get_header_options(
4848 ]
4949 for url in license_info ["urls" ]
5050 ]
51- elif isinstance (license_notice , str ):
51+ elif isinstance (license_notice , str ) and len ( license_notice ) > 0 :
5252 if not Path (license_notice ).is_file ():
5353 raise FileNotFoundError ("Unable to locate the text of the license notice." )
5454 with open (license_notice , "r" ) as f :
You can’t perform that action at this time.
0 commit comments