-
Notifications
You must be signed in to change notification settings - Fork 7
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
Flake8 W503 and W504 #10
Comments
interesting - flake8 says that the tool should be updated to not enforce W503 (https://www.flake8rules.com/rules/W503.html), but it's still there.. I f we assume that flake8 made their mind about this, my preference would go to disable W503 only. I'll add a pointer to this issue to the things to discuss before next cookiecutter. |
solved in #21 |
per mila-iqia/cookiecutter-pyml#10 this is what's now recommended
* Registered the 'x' button in robot.py to enable the solenoid on push and disable on release * Switched from using bad method Used Xboxmap.getmechY(), that method no longer exist. Now used a different variable * Moved testBot.py to testSensors and commented code * For PR#73 added back in the comment for the 3200 robot base class * Removed self.motors * Removed the unit tests agian...accidental add * camelCasing camelCased the shooterMotorsVariable * Brakes Brake mode on spark maxes is now changable through the key 'Brake' and True or False * Changed brake name now to change Idle mode, use IdleBrake and True/False in config.yml * Added config searching. Uses file stored in home dir to get name of config file. If not found fallsback to default * Changed names Changed names of joystick. Changed names of ShooterMotors to shooterMotors for camelCasing reasons * updated minibot config to match minibot * Fixed PIP8 linting * State machine shooter (#73) * Added ready to fire * Improved sensor logic * Added Sensor Logic * Joystick control * Added button callback for shooter activation * Mostly working manual/automatic shoot; crashes when more than 4 balls loaded in automatic * Added elevator to config.yml * Component mapper is reworked. Added ability to check compatibility strings in components. THis will attempt to disable them if not compatible. Moved motorHelper Moved motor creation to robot updated configs for new component mapper Tested on sim with minibot, scorpion, and doof for drive train functionality * Component refactor and change to elevator so that it uses the new motors_loader rather than the old motorsList * State machine shooter refactor (#85) Refactored shooter code to be state based. Added automatic shooter mode. * Windows package install script (#87) * added initial code * Added robotpy to installer and added requirements files * Changed working directory and updated gitignore * Moved into the script folder into "utils" as it is a utility * Improve config (#88) * Added more config componets added more factories configured pneumatics to use new factories * cleaned up control types added gyro refernce to drive train * Sensitivity (#86) * Sensitivity applies a ^1.6 curve to the right/left drive controller input in robot.py's initPeriodic * Adds current limit methods Tested, works with ctre/rev controllers * changed to use tank mode, inverted all motor (#95) * Shooter callbacks (#96) * added calculateRPM() and changed findConfig() findConfig now has an argument for the name of the config. The only time this is currently used is to find the robot config but I'm planning to use it to store values for RPM calculations so I added the argument so I could use the method to find the yml. * switching to linear curve Instead of equation, find point behind and in front of current distance and approximate * ci: 🎡 ignore ONLY W503 and keep W504 per mila-iqia/cookiecutter-pyml#10 this is what's now recommended Co-authored-by: DrKittyKat <43834685+DrKittyKat@users.noreply.github.com> Co-authored-by: cannedlock <zwinter03@gmail.com> Co-authored-by: Chris Hirsch <chris@base2technology.com> Co-authored-by: cannedlock <56943162+cannedlock@users.noreply.github.com> Co-authored-by: Nathan Beasley <tuffinmuffin@gmail.com> Co-authored-by: hell0w0rld2 <43834630+hell0w0rld2@users.noreply.github.com> Co-authored-by: DriveDE <eric.hall08@gmail.com> Co-authored-by: unknown <ehsraptacon3200@gmail.com>
- Raise `UseNextClass` if `block` sent to the constructor is `None`. - Check if a user mentions a footnote in a DB on a different page. I.e., enforce that the DB with footnotes being mentioned must be a child of the original page (e.g., an inline DB). Raise a `PluginError` with helpful information to track down the offending mention. - Added W503 and W504 to the `flake8` ignore list. See this closed PR: mila-iqia/cookiecutter-pyml#10. These were both active and causing contradictory warnings impossible to fix. - Update tests accordingly for new changes.
The current config makes flake8 enforce both W503 and W504 warnings which is contradictory.
W503 is "line break before binary operator" which prohibits the following :
W504 is "line break before binary operator" which prohibits the following :
Having both warnings on mean that we simply can have a line break in the vicinity of a binary operator.
According to the pep8 style guide (https://www.python.org/dev/peps/pep-0008/#id20) the recommendation used to be to have linebreaks after the binary operator but is now to have them before (since 2016 according to a discussion I saw on StackOverflow). Both styles are considered permissible so long as the code is locally consistent.
I think that at least one of those warning should be disabled. However, since both styles are permissible, disabling both would also be an option.
The text was updated successfully, but these errors were encountered: