Project

General

Profile

0001-pep8-python3-29914.patch

Benjamin Dauvergne, 19 Apr 2019 10:59 AM

Download (2.97 KB)

View differences:

Subject: [PATCH 1/2] pep8/python3 (#29914)

 bijoe/schemas.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
bijoe/schemas.py
16 16
# You should have received a copy of the GNU Affero General Public License
17 17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 18

  
19
import six
20

  
19 21
import datetime
20 22
import decimal
21 23
import collections
......
81 83
        for key in slots:
82 84
            assert key in d or hasattr(cls, key), \
83 85
                '%s.%s is is a mandatory attribute' % (cls.__name__, key)
84
            if not key in d:
86
            if key not in d:
85 87
                continue
86 88
            value = d[key]
87 89
            if key in types:
......
126 128
    __slots__ = ['name', 'label', 'type', 'expression']
127 129
    __types__ = {
128 130
        'name': str,
129
        'label': unicode,
131
        'label': six.text_type,
130 132
        'type': type_cast,
131 133
        'expression': str,
132 134
    }
......
138 140
                 'filter_needs_join', 'filter_expression']
139 141
    __types__ = {
140 142
        'name': str,
141
        'label': unicode,
143
        'label': six.text_type,
142 144
        'type': str,
143 145
        'join': [str],
144 146
        'value': str,
......
193 195
                    value='TO_CHAR(EXTRACT(month from %s), \'00\') || \'/\' || EXTRACT(year from %s)'
194 196
                          % (self.value, self.value),
195 197
                    group_by='EXTRACT(year from %s), EXTRACT(month from %s)' % (self.value,
196
                                                                                  self.value),
198
                                                                                self.value),
197 199
                    order_by=['EXTRACT(year from %s), EXTRACT(month from %s)' % (self.value,
198
                                                                                  self.value)],
200
                                                                                 self.value)],
199 201
                    filter=False),
200 202
                Dimension(
201 203
                    label=u'mois (%s)' % self.label,
......
316 318
                 'measures']
317 319
    __types__ = {
318 320
        'name': str,
319
        'label': unicode,
321
        'label': six.text_type,
320 322
        'fact_table': str,
321 323
        'json_field': str,
322 324
        'key': str,
......
370 372
    __slots__ = ['name', 'label', 'pg_dsn', 'search_path', 'cubes']
371 373
    __types__ = {
372 374
        'name': str,
373
        'label': unicode,
375
        'label': six.text_type,
374 376
        'pg_dsn': str,
375 377
        'search_path': [str],
376 378
        'cubes': [Cube],
377
        'search_path': [str],
378 379
    }
379 380

  
380 381
    def check(self):
381
-