-
Notifications
You must be signed in to change notification settings - Fork 303
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
Ensure that primary and sequence keys cannot be the same #2106
Conversation
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.
One minor comment but otherwise LGTM!
sdv/metadata/single_table.py
Outdated
setting_primary_as_sequence = key_type == 'sequence' and column_name == self.primary_key | ||
if setting_sequence_as_primary or setting_primary_as_sequence: | ||
raise InvalidMetadataError( | ||
f'The column ({column_name}) cannot be set as {key_type}_key as it is already set as the ' |
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.
This line is 111 characters. Not sure why the linter isn't complaining
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.
@gsheni It seems to be because we are ignoring the line-to-long rule here
Line 206 in f55e51e
"E501", |
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.
Added that rule back in and fixed the line length
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.
LGTM!
Can we re-run the tests to check that everything passes?
resolves #2096
CU-86b11yb3u
Make sure
_validate_key
preventsprimary_key
from being the same assequence_key