فهرست منبع

Del `(object)` from 200 inc deeplearning/aicamera/trainer/utils/metrics.py

Summary: Python3 makes the use of `(object)` in class inheritance unnecessary. Let's modernize our code by eliminating this.

Reviewed By: itamaro

Differential Revision: D48673901

fbshipit-source-id: 3e0ef05efe886b32a07bb58bd0725fa2ec934c14
Richard Barnes 2 سال پیش
والد
کامیت
166ce2c71a
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 2 2
      python/fasttext_module/fasttext/FastText.py
  2. 1 1
      setup.py

+ 2 - 2
python/fasttext_module/fasttext/FastText.py

@@ -24,7 +24,7 @@ EOW = ">"
 displayed_errors = {}
 
 
-class _Meter(object):
+class _Meter:
     def __init__(self, fasttext_model, meter):
         self.f = fasttext_model
         self.m = meter
@@ -77,7 +77,7 @@ class _Meter(object):
         return recall
 
 
-class _FastText(object):
+class _FastText:
     """
     This class defines the API to inspect models and should not be used to
     create objects. It will be returned by functions such as load_model or

+ 1 - 1
setup.py

@@ -26,7 +26,7 @@ FASTTEXT_SRC = "src"
 
 # Based on https://github.com/pybind/python_example
 
-class get_pybind_include(object):
+class get_pybind_include:
     """Helper class to determine the pybind11 include path
 
     The purpose of this class is to postpone importing pybind11