whylabs/whylogs-python

View on GitHub

Showing 236 of 3,906 total issues

Avoid too many return statements within this function.
Open

        return Predicate(Relation._not, right=right, component=right._component), i
Severity: Major
Found in python/whylogs/core/predicate_parser.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return PreprocessedColumn.apply(list_format)
    Severity: Major
    Found in python/whylogs/core/preprocessing.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return Predicate(Relation.geq, value, component=component), i
      Severity: Major
      Found in python/whylogs/core/predicate_parser.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return x >= value
        Severity: Major
        Found in python/whylogs/core/relations.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return lambda x: x > value  # type: ignore
          Severity: Major
          Found in python/whylogs/core/metrics/condition_count_metric.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return not self._right(metric or x)  # type: ignore
            Severity: Major
            Found in python/whylogs/core/relations.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return Predicate(Relation.search, value(), component=component), i
              Severity: Major
              Found in python/whylogs/core/predicate_parser.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return lambda x: x != value  # type: ignore
                Severity: Major
                Found in python/whylogs/core/metrics/condition_count_metric.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return x < value
                  Severity: Major
                  Found in python/whylogs/core/relations.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return
                    Severity: Major
                    Found in python/whylogs/core/preprocessing.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return False
                      Severity: Major
                      Found in python/whylogs/core/datatypes.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return x > value
                        Severity: Major
                        Found in python/whylogs/core/relations.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return result
                          Severity: Major
                          Found in python/whylogs/core/preprocessing.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return x <= value
                            Severity: Major
                            Found in python/whylogs/core/relations.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return Predicate(Relation._or, left=left, right=right, component=left._component), i
                              Severity: Major
                              Found in python/whylogs/core/predicate_parser.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return lambda x: x <= value  # type: ignore
                                Severity: Major
                                Found in python/whylogs/core/metrics/condition_count_metric.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return result
                                  Severity: Major
                                  Found in python/whylogs/core/preprocessing.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                return self._left(metric or x) or self._right(metric or x)  # type: ignore
                                    Severity: Major
                                    Found in python/whylogs/core/relations.py - About 30 mins to fix

                                      Function get_pil_exif_metadata has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      def get_pil_exif_metadata(img: ImageType) -> Dict:
                                          """
                                          Grab EXIF metadata from image
                                      
                                          Args:
                                      Severity: Minor
                                      Found in python/whylogs/extras/image_metric.py - About 25 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function feature_statistics has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def feature_statistics(
                                              self, feature_name: Union[str, List[str]], profile: str = "reference", cell_height: Optional[str] = None
                                          ) -> HTML:
                                              """
                                              Generate a report for the main statistics of specified feature, for a given profile (target or reference).
                                      Severity: Minor
                                      Found in python/whylogs/viz/notebook_profile_viz.py - About 25 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language