-
-
Notifications
You must be signed in to change notification settings - Fork 73
Conversation
# Conflicts: # .circleci/config.yml
@@ -132,7 +132,7 @@ export default class ControlledTable extends PureComponent<ControlledTableProps> | |||
this.handleResize(); | |||
} | |||
|
|||
componentWillMount() { | |||
UNSAFE_componentWillMount() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason these listeners can't just go in componentDidMount
?
@@ -146,7 +146,7 @@ export default class ControlledTable extends PureComponent<ControlledTableProps> | |||
document.removeEventListener('paste', this.handlePaste); | |||
} | |||
|
|||
componentWillUpdate() { | |||
UNSAFE_componentWillUpdate() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise, why not put this one in componentDidUpdate
?
# Wait for table | ||
WebDriverWait(dash_duo.driver, _TIMEOUT).until( | ||
EC.presence_of_element_located((By.CSS_SELECTOR, "#{}".format(IDS["table"]))) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just dash_duo.wait_for_element("#{}".format(IDS["TABLE"])
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
|
||
from selenium.webdriver.common.by import By | ||
from selenium.webdriver.support import expected_conditions as EC | ||
from selenium.webdriver.support.wait import WebDriverWait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now you can get rid of these too, right? Which I'd have thought flake8 would have told you but perhaps it's not run on the test code...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it's apparently not run on the tests folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃 excellent!
@@ -1,5 +1,5 @@ | |||
[flake8] | |||
ignore = E203, E266, E501, E731, W503 | |||
ignore = C901, E203, E266, E501, E731, W503 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't flag methods that are "too complex", we can decide that ourselves.. especially for tests!
Companion to plotly/dash#1145