tensorflow/tensorflow

View on GitHub

Showing 11,252 of 26,546 total issues

File metric_ops_test.py has 5806 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Major
Found in tensorflow/contrib/metrics/python/ops/metric_ops_test.py - About 2 wks to fix

    File feature_column_test.py has 5421 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    Severity: Major
    Found in tensorflow/python/feature_column/feature_column_test.py - About 2 wks to fix

      File ops.py has 4391 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
      #
      # Licensed under the Apache License, Version 2.0 (the "License");
      # you may not use this file except in compliance with the License.
      # You may obtain a copy of the License at
      Severity: Major
      Found in tensorflow/python/framework/ops.py - About 1 wk to fix

        File backend.py has 3728 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
        #
        # Licensed under the Apache License, Version 2.0 (the "License");
        # you may not use this file except in compliance with the License.
        # You may obtain a copy of the License at
        Severity: Major
        Found in tensorflow/python/keras/backend.py - About 1 wk to fix

          File layers_test.py has 3505 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
          #
          # Licensed under the Apache License, Version 2.0 (the "License");
          # you may not use this file except in compliance with the License.
          # You may obtain a copy of the License at
          Severity: Major
          Found in tensorflow/contrib/layers/python/layers/layers_test.py - About 1 wk to fix

            File metrics_test.py has 3435 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
            #
            # Licensed under the Apache License, Version 2.0 (the "License");
            # you may not use this file except in compliance with the License.
            # You may obtain a copy of the License at
            Severity: Major
            Found in tensorflow/python/kernel_tests/metrics_test.py - About 1 wk to fix

              File head_test.py has 3244 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
              #
              # Licensed under the Apache License, Version 2.0 (the "License");
              # you may not use this file except in compliance with the License.
              # You may obtain a copy of the License at
              Severity: Major
              Found in tensorflow/python/estimator/canned/head_test.py - About 1 wk to fix

                File metric_ops.py has 3195 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
                #
                # Licensed under the Apache License, Version 2.0 (the "License");
                # you may not use this file except in compliance with the License.
                # You may obtain a copy of the License at
                Severity: Major
                Found in tensorflow/contrib/metrics/python/ops/metric_ops.py - About 1 wk to fix

                  File image_ops_test.py has 3074 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
                  #
                  # Licensed under the Apache License, Version 2.0 (the "License");
                  # you may not use this file except in compliance with the License.
                  # You may obtain a copy of the License at
                  Severity: Major
                  Found in tensorflow/python/ops/image_ops_test.py - About 1 wk to fix

                    File metrics_impl.py has 2957 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
                    #
                    # Licensed under the Apache License, Version 2.0 (the "License");
                    # you may not use this file except in compliance with the License.
                    # You may obtain a copy of the License at
                    Severity: Major
                    Found in tensorflow/python/ops/metrics_impl.py - About 1 wk to fix

                      File control_flow_ops.py has 2914 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
                      #
                      # Licensed under the Apache License, Version 2.0 (the "License");
                      # you may not use this file except in compliance with the License.
                      # You may obtain a copy of the License at
                      Severity: Major
                      Found in tensorflow/python/ops/control_flow_ops.py - About 1 wk to fix

                        File layers.py has 2862 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        # -*- coding: utf-8 -*-
                        # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
                        #
                        # Licensed under the Apache License, Version 2.0 (the "License");
                        # you may not use this file except in compliance with the License.
                        Severity: Major
                        Found in tensorflow/contrib/layers/python/layers/layers.py - About 1 wk to fix

                          File feature_column.py has 2775 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
                          #
                          # Licensed under the Apache License, Version 2.0 (the "License");
                          # you may not use this file except in compliance with the License.
                          # You may obtain a copy of the License at
                          Severity: Major
                          Found in tensorflow/python/feature_column/feature_column.py - About 1 wk to fix

                            File control_flow_ops_py_test.py has 2602 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
                            #
                            # Licensed under the Apache License, Version 2.0 (the "License");
                            # you may not use this file except in compliance with the License.
                            # You may obtain a copy of the License at
                            Severity: Major
                            Found in tensorflow/python/kernel_tests/control_flow_ops_py_test.py - About 1 wk to fix

                              File rnn_cell.py has 2508 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
                              #
                              # Licensed under the Apache License, Version 2.0 (the "License");
                              # you may not use this file except in compliance with the License.
                              # You may obtain a copy of the License at
                              Severity: Major
                              Found in tensorflow/contrib/rnn/python/ops/rnn_cell.py - About 1 wk to fix

                                File feature_column_ops_test.py has 2444 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
                                #
                                # Licensed under the Apache License, Version 2.0 (the "License");
                                # you may not use this file except in compliance with the License.
                                # You may obtain a copy of the License at
                                Severity: Major
                                Found in tensorflow/contrib/layers/python/layers/feature_column_ops_test.py - About 6 days to fix

                                  Function _apply_op_helper has a Cognitive Complexity of 325 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                    def _apply_op_helper(self, op_type_name, name=None, **keywords):
                                      """Implementation of apply_op that returns output_structure, op."""
                                      op_info = self._ops.get(op_type_name, None)
                                      if op_info is None:
                                        raise RuntimeError("Unrecognized Op name " + op_type_name)
                                  Severity: Minor
                                  Found in tensorflow/python/framework/op_def_library.py - About 6 days 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

                                  File saver_test.py has 2385 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
                                  #
                                  # Licensed under the Apache License, Version 2.0 (the "License");
                                  # you may not use this file except in compliance with the License.
                                  # You may obtain a copy of the License at
                                  Severity: Major
                                  Found in tensorflow/python/training/saver_test.py - About 6 days to fix

                                    File convolutional.py has 2321 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
                                    #
                                    # Licensed under the Apache License, Version 2.0 (the "License");
                                    # you may not use this file except in compliance with the License.
                                    # You may obtain a copy of the License at
                                    Severity: Major
                                    Found in tensorflow/python/keras/layers/convolutional.py - About 6 days to fix

                                      File tpu_estimator.py has 2317 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
                                      #
                                      # Licensed under the Apache License, Version 2.0 (the "License");
                                      # you may not use this file except in compliance with the License.
                                      # You may obtain a copy of the License at
                                      Severity: Major
                                      Found in tensorflow/contrib/tpu/python/tpu/tpu_estimator.py - About 6 days to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language