We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
_select_matching_columns
ok, how about taking the shorter branch first here? I.e. if field.alias is None:
if field.alias is None:
Also, what do you think about defining three small functions adding semantics and hiding the lowest level branching?
Names can be made more descriptive, but with this it would read something like:
if field.alias is None: # return [column] if no error matched = _check_non_alias(df, column, matching_columns_in_df, optional) continue if field.regex: matched = cls._check_alias_regex(df, column, matching_columns_in_df, optional) else: # returns [field.alias] if no error matched = cls._check_alias(df, column, matching_columns_in_df, optional) matching_columns_in_df.extend(matched)
(Here these are class methods since cls is used in the message.)
cls
It might also help testing to be more unit-y, i.e, testing each individual _check function.
_check
Originally posted by @pierreprecis in #5 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ok, how about taking the shorter branch first here? I.e.
if field.alias is None:
Also, what do you think about defining three small functions adding semantics and hiding the lowest level branching?
Names can be made more descriptive, but with this it would read something like:
(Here these are class methods since
cls
is used in the message.)It might also help testing to be more unit-y, i.e, testing each individual
_check
function.Originally posted by @pierreprecis in #5 (comment)
The text was updated successfully, but these errors were encountered: