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

Library loading #205

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Library loading #205

wants to merge 2 commits into from

Conversation

suuppl
Copy link

@suuppl suuppl commented Dec 5, 2024

Hi,
thank you for this library, it's really easy to use.

I did some minor refactoring and added a feature:

  • move the library loading code to the base class and added support to pass in a custom library path (at least for windows)
    • cleans up codebase
    • I had some problems with find_library(), so i added the feature to override the dll path
  • change the default values in the base class to None (mostly untested as I don't have any picoscope where I am at the moment)
    • makes it obvious if you've forgotten a value in a scope specific implementation
  • update makedocs.bat to call pydoc as a script
    • no dependency on python location
  • update the html docs (I just ran makedocs.bat, so no idea if the docs look like they should)

Feel free to cherry-pick what you like, given that I did basically no testing...
Let me know if you have any questions ;)

…ck for correct implementation.

Refactor DLL loading:
 - accept custom DLL paths
 - move common code to base class
@pep8speaks
Copy link

Hello @suuppl! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 77:19: E261 at least two spaces before inline comment
Line 80:21: E261 at least two spaces before inline comment
Line 80:29: W291 trailing whitespace
Line 81:21: E261 at least two spaces before inline comment
Line 84:25: E261 at least two spaces before inline comment
Line 85:25: E261 at least two spaces before inline comment
Line 86:27: E261 at least two spaces before inline comment
Line 105:24: E261 at least two spaces before inline comment
Line 106:20: E261 at least two spaces before inline comment
Line 108:29: E261 at least two spaces before inline comment
Line 110:21: E261 at least two spaces before inline comment
Line 126:80: E501 line too long (89 > 79 characters)
Line 172:5: E303 too many blank lines (2)
Line 172:80: E501 line too long (83 > 79 characters)
Line 176:80: E501 line too long (118 > 79 characters)
Line 177:80: E501 line too long (132 > 79 characters)
Line 219:80: E501 line too long (85 > 79 characters)
Line 226:80: E501 line too long (114 > 79 characters)
Line 336:80: E501 line too long (120 > 79 characters)
Line 367:80: E501 line too long (119 > 79 characters)
Line 379:80: E501 line too long (90 > 79 characters)
Line 419:80: E501 line too long (93 > 79 characters)
Line 446:80: E501 line too long (84 > 79 characters)
Line 502:80: E501 line too long (114 > 79 characters)
Line 539:80: E501 line too long (90 > 79 characters)
Line 549:80: E501 line too long (88 > 79 characters)
Line 561:80: E501 line too long (101 > 79 characters)
Line 606:80: E501 line too long (109 > 79 characters)
Line 693:80: E501 line too long (99 > 79 characters)
Line 711:80: E501 line too long (117 > 79 characters)
Line 758:80: E501 line too long (89 > 79 characters)
Line 761:80: E501 line too long (99 > 79 characters)
Line 763:80: E501 line too long (80 > 79 characters)
Line 766:80: E501 line too long (81 > 79 characters)
Line 778:80: E501 line too long (118 > 79 characters)
Line 821:80: E501 line too long (98 > 79 characters)
Line 826:80: E501 line too long (86 > 79 characters)
Line 827:80: E501 line too long (84 > 79 characters)
Line 829:80: E501 line too long (114 > 79 characters)
Line 951:80: E501 line too long (101 > 79 characters)
Line 1099:80: E501 line too long (101 > 79 characters)
Line 1129:80: E501 line too long (119 > 79 characters)
Line 1142:80: E501 line too long (114 > 79 characters)
Line 1221:80: E501 line too long (101 > 79 characters)

Line 134:1: W293 blank line contains whitespace

Line 128:1: W293 blank line contains whitespace

Line 121:1: W293 blank line contains whitespace

Line 135:1: W293 blank line contains whitespace

Line 129:1: W293 blank line contains whitespace

Line 190:1: W293 blank line contains whitespace

Line 137:1: W293 blank line contains whitespace

Line 143:1: W293 blank line contains whitespace

Line 138:1: W293 blank line contains whitespace

Line 213:80: E501 line too long (84 > 79 characters)
Line 215:1: W293 blank line contains whitespace

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

Successfully merging this pull request may close these issues.

2 participants