Pidgeot / python-lnp

Cross-platform re-implementation of the Lazy Newb Pack launcher.
ISC License
64 stars 10 forks source link

Cleanup codebase #191

Closed txtsd closed 1 year ago

txtsd commented 1 year ago

This should close #189 and close #190 when it's ready.

Pidgeot commented 1 year ago

I know you're still working on this, but I would much prefer to keep ignoring wildcard-import, since the automatic override of base tkinter classes is kind of the point of tkinter.ttk and explicitly suggested in the documentation: https://docs.python.org/3.11/library/tkinter.ttk.html

By using the wildcard imports, future versions of ttk can provide new and better-looking implementations, usually with no code changes.

txtsd commented 1 year ago

That makes sense. I'll get it done.

If you have more inputs, feel free to suggest even if the PR isn't ready yet.

txtsd commented 1 year ago

@Pidgeot How do you want me to handle invalid-names?

pylint output ```pylint λ pylint --disable=all --enable=invalid-name launch.py core tkgui docs ************* Module core.embarks core/embarks.py:26:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module core.json_config core/json_config.py:64:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) ************* Module core.helpers core/helpers.py:24:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/helpers.py:34:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/helpers.py:53:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/helpers.py:92:40: C0103: Argument name "s" doesn't conform to snake_case naming style (invalid-name) ************* Module core.dfraw core/dfraw.py:103:16: C0103: Variable name "g" doesn't conform to snake_case naming style (invalid-name) core/dfraw.py:282:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) core/dfraw.py:290:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) core/dfraw.py:292:16: C0103: Variable name "c2" doesn't conform to snake_case naming style (invalid-name) core/dfraw.py:301:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) core/dfraw.py:312:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) core/dfraw.py:353:37: C0103: Variable name "fd" doesn't conform to snake_case naming style (invalid-name) core/dfraw.py:359:37: C0103: Variable name "fd" doesn't conform to snake_case naming style (invalid-name) core/dfraw.py:364:47: C0103: Variable name "fd" doesn't conform to snake_case naming style (invalid-name) core/dfraw.py:383:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module core.settings core/settings.py:603:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/settings.py:604:12: C0103: Variable name "fn" doesn't conform to snake_case naming style (invalid-name) core/settings.py:606:16: C0103: Variable name "ok" doesn't conform to snake_case naming style (invalid-name) ************* Module core.keybinds core/keybinds.py:24:46: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/keybinds.py:38:45: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/keybinds.py:40:4: C0103: Variable name "od" doesn't conform to snake_case naming style (invalid-name) core/keybinds.py:71:50: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module core.lnp core/lnp.py:59:0: C0103: Constant name "lnp" doesn't conform to UPPER_CASE naming style (invalid-name) core/lnp.py:75:8: C0103: Attribute name "BASEDIR" doesn't conform to snake_case naming style (invalid-name) core/lnp.py:77:12: C0103: Attribute name "os" doesn't conform to snake_case naming style (invalid-name) core/lnp.py:103:8: C0103: Attribute name "ui" doesn't conform to snake_case naming style (invalid-name) core/lnp.py:71:8: C0103: Constant name "lnp" doesn't conform to UPPER_CASE naming style (invalid-name) ************* Module core.baselines core/baselines.py:52:12: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) core/baselines.py:56:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/baselines.py:106:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/baselines.py:132:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/baselines.py:139:76: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) core/baselines.py:141:72: C0103: Variable name "m" doesn't conform to snake_case naming style (invalid-name) ************* Module core.log core/log.py:8:0: C0103: Constant name "_log" doesn't conform to UPPER_CASE naming style (invalid-name) core/log.py:78:8: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/log.py:83:20: C0103: Variable name "l" doesn't conform to snake_case naming style (invalid-name) core/log.py:86:20: C0103: Variable name "l" doesn't conform to snake_case naming style (invalid-name) core/log.py:94:4: C0103: Method name "d" doesn't conform to snake_case naming style (invalid-name) core/log.py:98:4: C0103: Method name "e" doesn't conform to snake_case naming style (invalid-name) core/log.py:106:4: C0103: Method name "v" doesn't conform to snake_case naming style (invalid-name) core/log.py:110:4: C0103: Method name "w" doesn't conform to snake_case naming style (invalid-name) ************* Module core.graphics core/graphics.py:42:4: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:44:8: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:49:8: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:63:48: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:64:16: C0103: Variable name "l" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:75:8: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:170:24: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:285:4: C0103: Variable name "a" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:286:4: C0103: Variable name "b" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:287:4: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) core/graphics.py:326:8: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name) ************* Module core.importer core/importer.py:60:49: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/importer.py:70:8: C0103: Variable name "it" doesn't conform to snake_case naming style (invalid-name) core/importer.py:95:41: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/importer.py:97:42: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/importer.py:99:46: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/importer.py:121:8: C0103: Variable name "st" doesn't conform to snake_case naming style (invalid-name) ************* Module core.hacks core/hacks.py:30:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/hacks.py:119:52: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module core.download core/download.py:96:30: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name) core/download.py:161:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) ************* Module core.rawlint core/rawlint.py:62:11: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) core/rawlint.py:65:8: C0103: Variable name "o" doesn't conform to snake_case naming style (invalid-name) core/rawlint.py:94:8: C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name) core/rawlint.py:100:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/rawlint.py:129:4: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/rawlint.py:129:7: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/rawlint.py:137:4: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/rawlint.py:137:7: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module core.colors core/colors.py:33:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/colors.py:35:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/colors.py:37:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/colors.py:40:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/colors.py:42:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module core.launcher core/launcher.py:112:69: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/launcher.py:130:73: C0103: Variable name "ps" doesn't conform to snake_case naming style (invalid-name) core/launcher.py:131:12: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) core/launcher.py:136:8: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) ************* Module core.mods core/mods.py:16:17: C0103: Argument name "fn" doesn't conform to snake_case naming style (invalid-name) core/mods.py:108:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/mods.py:191:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/mods.py:212:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/mods.py:229:46: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/mods.py:230:24: C0103: Variable name "mb" doesn't conform to snake_case naming style (invalid-name) core/mods.py:231:46: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/mods.py:232:24: C0103: Variable name "gb" doesn't conform to snake_case naming style (invalid-name) core/mods.py:253:68: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/mods.py:384:40: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/mods.py:419:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/mods.py:422:40: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/mods.py:479:46: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module core.legends_processor core/legends_processor.py:50:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/legends_processor.py:82:4: C0103: Variable name "l" doesn't conform to snake_case naming style (invalid-name) core/legends_processor.py:89:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/legends_processor.py:121:8: C0103: Variable name "m" doesn't conform to snake_case naming style (invalid-name) core/legends_processor.py:122:8: C0103: Variable name "m" doesn't conform to snake_case naming style (invalid-name) core/legends_processor.py:125:12: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name) core/legends_processor.py:130:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/legends_processor.py:138:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module core.utilities core/utilities.py:46:8: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name) core/utilities.py:199:4: C0103: Variable name "m" doesn't conform to snake_case naming style (invalid-name) core/utilities.py:205:12: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) ************* Module core.update core/update.py:35:8: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name) core/update.py:116:39: C0103: Variable name "zf" doesn't conform to snake_case naming style (invalid-name) core/update.py:125:36: C0103: Variable name "tf" doesn't conform to snake_case naming style (invalid-name) core/update.py:171:8: C0103: Variable name "directFilename" doesn't conform to snake_case naming style (invalid-name) core/update.py:181:8: C0103: Variable name "versionRegex" doesn't conform to snake_case naming style (invalid-name) core/update.py:187:8: C0103: Variable name "urlRegex" doesn't conform to snake_case naming style (invalid-name) core/update.py:196:8: C0103: Variable name "urlRegex" doesn't conform to snake_case naming style (invalid-name) core/update.py:209:8: C0103: Variable name "jsonPath" doesn't conform to snake_case naming style (invalid-name) core/update.py:215:8: C0103: Variable name "jsonPath" doesn't conform to snake_case naming style (invalid-name) core/update.py:224:8: C0103: Variable name "jsonPath" doesn't conform to snake_case naming style (invalid-name) core/update.py:233:8: C0103: Variable name "jsonPath" doesn't conform to snake_case naming style (invalid-name) ************* Module tkgui.binding tkgui/binding.py:9:0: C0103: Constant name "__lnp" doesn't conform to UPPER_CASE naming style (invalid-name) tkgui/binding.py:10:0: C0103: Constant name "__ui" doesn't conform to UPPER_CASE naming style (invalid-name) tkgui/binding.py:12:14: C0103: Argument name "ui" doesn't conform to snake_case naming style (invalid-name) tkgui/binding.py:15:4: C0103: Constant name "__lnp" doesn't conform to UPPER_CASE naming style (invalid-name) tkgui/binding.py:15:4: C0103: Constant name "__ui" doesn't conform to UPPER_CASE naming style (invalid-name) tkgui/binding.py:34:4: C0103: Variable name "o" doesn't conform to snake_case naming style (invalid-name) tkgui/binding.py:36:8: C0103: Variable name "o" doesn't conform to snake_case naming style (invalid-name) ************* Module core.terminal core/terminal.py:40:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:41:16: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:43:20: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:52:4: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:54:8: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:125:8: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:141:56: C0103: Variable name "FNULL" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:193:12: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:212:56: C0103: Variable name "FNULL" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:232:56: C0103: Variable name "FNULL" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:248:0: C0103: Class name "i3Terminal" doesn't conform to PascalCase naming style (invalid-name) core/terminal.py:261:0: C0103: Class name "rxvtTerminal" doesn't conform to PascalCase naming style (invalid-name) core/terminal.py:267:56: C0103: Variable name "FNULL" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:285:0: C0103: Class name "xtermTerminal" doesn't conform to PascalCase naming style (invalid-name) core/terminal.py:291:56: C0103: Variable name "FNULL" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:342:24: C0103: Argument name "fn" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:353:52: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:361:26: C0103: Argument name "fn" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:365:36: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:394:54: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:395:8: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:400:34: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:402:51: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:414:51: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:426:25: C0103: Argument name "t" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:436:53: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/terminal.py:450:24: C0103: Argument name "t" doesn't conform to snake_case naming style (invalid-name) ************* Module core.df core/df.py:93:4: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) core/df.py:93:7: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/df.py:197:19: C0103: Variable name "ch" doesn't conform to snake_case naming style (invalid-name) core/df.py:201:61: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) core/df.py:230:12: C0103: Variable name "m" doesn't conform to snake_case naming style (invalid-name) core/df.py:269:12: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) core/df.py:337:8: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) core/df.py:339:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) core/df.py:344:16: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) core/df.py:346:16: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) ************* Module tkgui.mods tkgui/mods.py:40:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/mods.py:61:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/mods.py:217:8: C0103: Variable name "m" doesn't conform to snake_case naming style (invalid-name) tkgui/mods.py:217:11: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module tkgui.layout tkgui/layout.py:45:15: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) tkgui/layout.py:46:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) tkgui/layout.py:62:20: C0103: Variable name "n" doesn't conform to snake_case naming style (invalid-name) tkgui/layout.py:72:20: C0103: Variable name "n" doesn't conform to snake_case naming style (invalid-name) ************* Module tkgui.graphics tkgui/graphics.py:33:8: C0103: Variable name "n" doesn't conform to snake_case naming style (invalid-name) tkgui/graphics.py:195:15: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name) tkgui/graphics.py:296:15: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/graphics.py:315:8: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/graphics.py:370:19: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name) tkgui/graphics.py:384:15: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module tkgui.advanced tkgui/advanced.py:24:8: C0103: Attribute name "winX_var" doesn't conform to snake_case naming style (invalid-name) tkgui/advanced.py:25:8: C0103: Attribute name "winY_var" doesn't conform to snake_case naming style (invalid-name) tkgui/advanced.py:26:8: C0103: Attribute name "fullX_var" doesn't conform to snake_case naming style (invalid-name) tkgui/advanced.py:27:8: C0103: Attribute name "fullY_var" doesn't conform to snake_case naming style (invalid-name) ************* Module tkgui.options tkgui/options.py:145:8: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:155:8: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:167:8: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:171:12: C0103: Variable name "v2" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:184:8: C0103: Variable name "v1" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:188:12: C0103: Variable name "v2" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:200:8: C0103: Variable name "v1" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:204:12: C0103: Variable name "v2" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:214:8: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:224:8: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:234:8: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:244:8: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:258:15: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:278:8: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:281:16: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:306:15: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/options.py:321:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) ************* Module tkgui.controls tkgui/controls.py:53:8: C0103: Attribute name "id" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:63:8: C0103: Variable name "x" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:64:8: C0103: Variable name "y" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:65:25: C0103: Variable name "tw" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:83:8: C0103: Variable name "tw" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:105:0: C0103: Constant name "__ui" doesn't conform to UPPER_CASE naming style (invalid-name) tkgui/controls.py:119:9: C0103: Argument name "ui" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:122:4: C0103: Constant name "__ui" doesn't conform to UPPER_CASE naming style (invalid-name) tkgui/controls.py:168:4: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:170:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:172:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:209:4: C0103: Variable name "b" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:231:4: C0103: Variable name "b" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:244:4: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:251:30: C0103: Argument name "y" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:337:4: C0103: Variable name "lf" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:341:4: C0103: Variable name "lb" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:368:5: C0103: Variable name "lf" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:368:9: C0103: Variable name "lb" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:403:5: C0103: Variable name "lf" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:403:9: C0103: Variable name "lb" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:459:4: C0103: Variable name "kf" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:463:4: C0103: Variable name "ke" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:466:4: C0103: Variable name "lf" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:467:4: C0103: Variable name "kb" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:477:4: C0103: Variable name "bf" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:478:11: C0103: Variable name "bn" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:501:4: C0103: Variable name "lf" doesn't conform to snake_case naming style (invalid-name) tkgui/controls.py:524:4: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name) ************* Module tkgui.child_windows tkgui/child_windows.py:31:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:65:8: C0103: Attribute name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:75:17: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:110:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:129:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:176:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:187:8: C0103: Variable name "ok" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:193:4: C0103: Method name "ok" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:219:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:277:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:309:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/child_windows.py:365:12: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name) ************* Module tkgui.tkgui tkgui/tkgui.py:38:4: C0103: Constant name "has_PIL" doesn't conform to UPPER_CASE naming style (invalid-name) tkgui/tkgui.py:44:8: C0103: Constant name "has_PIL" doesn't conform to UPPER_CASE naming style (invalid-name) tkgui/tkgui.py:46:8: C0103: Constant name "has_PIL" doesn't conform to UPPER_CASE naming style (invalid-name) tkgui/tkgui.py:124:8: C0103: Attribute name "updateDays" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:125:8: C0103: Attribute name "downloadBaselines" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:177:8: C0103: Attribute name "n" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:177:17: C0103: Variable name "n" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:316:16: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:399:19: C0103: Variable name "o" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:485:15: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:511:8: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:580:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:596:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:660:8: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name) tkgui/tkgui.py:696:16: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name) ************* Module docs.conf docs/conf.py:50:0: C0103: Constant name "needs_sphinx" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:71:0: C0103: Constant name "napoleon_use_rtype" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:77:0: C0103: Constant name "source_suffix" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:80:0: C0103: Constant name "master_doc" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:83:0: C0103: Constant name "project" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:84:0: C0103: Constant name "author" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:94:0: C0103: Constant name "release" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:99:4: C0103: Constant name "version" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:102:0: C0103: Constant name "today_fmt" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:110:0: C0103: Constant name "default_role" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:124:0: C0103: Constant name "pygments_style" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:131:0: C0103: Constant name "html_theme" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:169:0: C0103: Constant name "html_last_updated_fmt" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:175:0: C0103: Constant name "html_show_sphinx" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:178:0: C0103: Constant name "html_show_copyright" doesn't conform to UPPER_CASE naming style (invalid-name) docs/conf.py:181:0: C0103: Constant name "htmlhelp_basename" doesn't conform to UPPER_CASE naming style (invalid-name) ```

I could rename them all, but you might want to set some of the single letter variables as good names.

Pidgeot commented 1 year ago

@Pidgeot How do you want me to handle invalid-names?

Sorry it took a while to get back to you on this; holidays kinda got in the way of looking much at this.

I very much dislike the standard rules Pylint uses to detect invalid names: 1 or 2-letter names are fine in many cases, since the name isn't always important, and line length is a factor too. PEP8 doesn't mention name length anywhere that I can see, either. I know you can change that by altering the regexes it uses, but on the whole, I don't think it adds enough value to be worth dealing with.

If you want to address some (or all) of them anyway, feel free to give it your best shot, and ask about any cases you're unsure of. But I genuinely would not mind just leaving it disabled.

Oh, but make sure to leave the docs folder alone. The documentation generator (Sphinx) decided on those names, so they're not really something I'd want to change.

txtsd commented 1 year ago

Sorry it took a while to get back to you on this; holidays kinda got in the way of looking much at this.

No worries. Everyone's on break during holiday season~

I very much dislike the standard rules Pylint uses to detect invalid names: 1 or 2-letter names are fine in many cases, since the name isn't always important, and line length is a factor too. PEP8 doesn't mention name length anywhere that I can see, either. I know you can change that by altering the regexes it uses, but on the whole, I don't think it adds enough value to be worth dealing with.

If you want to address some (or all) of them anyway, feel free to give it your best shot, and ask about any cases you're unsure of. But I genuinely would not mind just leaving it disabled.

Oh, but make sure to leave the docs folder alone. The documentation generator (Sphinx) decided on those names, so they're not really something I'd want to change.

Will do!

txtsd commented 1 year ago

@Pidgeot Should I also avoid flake8 suggestions for docs/conf.py?

I guess what I want to know is will that file be regenerated at any point in the future, rendering any changes ephemeral?

Pidgeot commented 1 year ago

@Pidgeot Should I also avoid flake8 suggestions for docs/conf.py?

I guess what I want to know is will that file be regenerated at any point in the future, rendering any changes ephemeral?

It shouldn't need to. Honestly, I wouldn't be surprised if it will never be changed ever again.

But I'd prefer to leave it alone, so as to keep it as close to the generated version as possible. That will make it easier to pick our modifications out, since we can more easily compare it with a standard generated file.

txtsd commented 1 year ago

It shouldn't need to. Honestly, I wouldn't be surprised if it will never be changed ever again.

But I'd prefer to leave it alone, so as to keep it as close to the generated version as possible. That will make it easier to pick our modifications out, since we can more easily compare it with a standard generated file.

I actually used sphinx-quickstart to generate a new conf.py, and it's very minimal unlike the file we have. I don't think we'll ever be regenerating it since it's just a quickstart template.

Generated conf.py:

# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'PyLNP'
author = 'Michael Madsen (Pidgeot) and collaborators'
copyright = '2023, Pidgeot'
release = '0.14d'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

root_doc = 'index_'

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']

I think it's okay to hold it up to Python standards along with the rest of the project as long as we follow the Sphinx docs.

Pidgeot commented 1 year ago

Huh, I hadn't realized Peridexis changed as much as he did when he set it up - in that case, go for it.

(I guess it's also possible Sphinx just generates simpler files today compared to then. But it still seems fine.)

txtsd commented 1 year ago

Not sure why I forgot to mark as ready with the last commit, but oh well. It is.

Let me know what you think.

I'm thinking after this is merged, we can adopt ruff in lieu of pylint and flake8. It is SO FAST!

I also want to create a pyproject.toml to keep this project in sync with current python standards.

txtsd commented 1 year ago

@Pidgeot Gentle reminder to review this~

Pidgeot commented 1 year ago

Right, sorry... I was travelling when you last commented, and then forgot all about it by the time I was home to look at it. >.<

The only point I have left at this point is in the .spec file - the manifest string should probably be split by taking the XML structure into account. But I'll just make that change real quick after merging.

txtsd commented 1 year ago

Awesome!

Pidgeot commented 1 year ago

...it seems to have broken the documentation generation, though:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/sphinx/config.py", line 350, in eval_config_file
    exec(code, namespace)
  File "/mnt/data1/pylnp/python-lnp/docs/conf.py", line 25, in <module>
    from core import lnp
ModuleNotFoundError: No module named 'core'

make: *** [Makefile:55: html] Error 2

Will see if I can't fix that real quick.

Pidgeot commented 1 year ago

It's coming from this change: https://github.com/Pidgeot/python-lnp/pull/191/commits/46dd0f93580e64e4fb02c8ab43f78fdb3b4bccda

The import was moved up before the sys.path changes, so of course it won't see the module. That means I'll have to roll back that particular change.

txtsd commented 1 year ago

Oops I didn't try generating docs after the changes.

Should we include pylint in a commit hook or something of the sort? I've recently been using ruff instead. It's MUCH faster and does more than pylint.

EDIT: While we're at it we could also do CI/CD.

Pidgeot commented 12 months ago

I'm not opposed to the idea as such, but I have zero experience with setting that up on GitHub, so I'd need to read up on that first. I'm also not super clear on whether it makes a ton of sense to do full CI/CD when there's no automated testing.

The documentation already kind of works that way, though; a post-commit hook ends up triggering a rebuild and upload of the -dev version, as well as any newly added tags for named versions. That all happens on my home server, and it might be better and/or easier to just expand that instead. But that's something I'd need to spend time looking into.