Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined names #4

Closed
cclauss opened this issue Aug 23, 2017 · 4 comments
Closed

Undefined names #4

cclauss opened this issue Aug 23, 2017 · 4 comments

Comments

@cclauss
Copy link

cclauss commented Aug 23, 2017

flake8 testing of https://github.com/rsms/interface on Python 2.7.13

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./misc/svgsync2.py:122:23: F821 undefined name 'QuadraticBezier'
          path.append(QuadraticBezier(currentPos, vec2(cp.x, (cp.y + yOffs) * yMul), pos))
                      ^

./misc/svgsync2.py:473:6: F821 undefined name 'pathHash'
  if pathHash == existingSVGHash:
     ^

./misc/svgsync2.py:476:23: F821 undefined name 'pathHash'
  svg = glyphToSVG(g, pathHash)
                      ^

./misc/svgsync2.py:483:27: F821 undefined name 'pathHash'
  g.lib['svgsync.hash'] = pathHash
                          ^

./misc/pylib/fontbuild/Build.py:209:13: F821 undefined name 'Point'
        p = Point(a.p)
            ^

./misc/pylib/fontbuild/Build.py:214:13: F821 undefined name 'Point'
        p = Point(0,0)
            ^

./misc/pylib/fontbuild/Build.py:215:13: F821 undefined name 'Point'
        d = Point(c.deltas[0])
            ^

./misc/pylib/fontbuild/Build.py:221:13: F821 undefined name 'Point'
        s = Point(c.scale)
            ^

./misc/pylib/fontbuild/alignpoints.py:111:8: F821 undefined name 'glyph'
    if glyph.name is None:
       ^

./misc/pylib/fontbuild/mix.py:272:20: F821 undefined name 'font'
            return font.mixGlyphs(gname)
                   ^

./misc/rf-scripts/AdjustWidth.py:9:10: F821 undefined name 'CurrentFont'
  font = CurrentFont()
         ^

./misc/rf-scripts/ChangeUPM.py:91:8: F821 undefined name 'CurrentFont'
    if CurrentFont() is not None:
       ^

./misc/rf-scripts/ChangeUPM.py:92:18: F821 undefined name 'CurrentFont'
        oldUpm = CurrentFont().info.unitsPerEm
                 ^

./misc/rf-scripts/ChangeUPM.py:93:18: F821 undefined name 'CurrentFont'
        newUpm = CurrentFont().info.unitsPerEm
                 ^

./misc/rf-scripts/ChangeUPM.py:103:23: F821 undefined name 'CurrentFont'
            changeUPM(CurrentFont(), factor)
                      ^

./misc/rf-scripts/GridAdjust.py:9:10: F821 undefined name 'CurrentFont'
  font = CurrentFont()
         ^

./misc/rf-scripts/RemoveLocalGuides.py:5:10: F821 undefined name 'CurrentFont'
  font = CurrentFont()
         ^

./misc/rf-scripts/StripGlyphs.py:368:10: F821 undefined name 'CurrentFont'
  font = CurrentFont()
         ^

./misc/rf-scripts/ZeroWidth.py:9:10: F821 undefined name 'CurrentFont'
  font = CurrentFont()
         ^
@rsms
Copy link
Owner

rsms commented Aug 23, 2017

I'm not familiar with "flake8" — what does this mean?

@Joyrex
Copy link

Joyrex commented Aug 23, 2017

http://flake8.pycqa.org/en/latest/

@cclauss
Copy link
Author

cclauss commented Aug 23, 2017

Flake8 is a linter for Python that has tons of errors about code style, etc. but I have focused it with --select=E901,E999,F821,F822,F823 on those five issues that can crash your app.

@rsms
Copy link
Owner

rsms commented Aug 24, 2017

Oh. As much as I love to think about code style, the python code in this project is merely here to support specific little things and is not really part of "the main act", so to speak. Feel free to submit a PR that adjusts the style, but please try to make it as small of a change as possible. Also keep in mind that misc/pylib/fontbuild is sometimes upgraded from the roboto repository and any style changes will need to have patches made for them, maintained and applied after upgrading misc/pylib/fontbuild, which seems like a lof of work and effort for adjusting some code style.

Closing this for now as it's not an actual issue with Interface.

@rsms rsms closed this as completed Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants