OCA/l10n-italy

View on GitHub

Showing 1,161 of 1,161 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        for line in comunicazione.fatture_emesse_ids:
            partner_limit += 1
            invoices_limit = len(line.fatture_emesse_body_ids)
            if invoices_limit > 1000:
                errors += [
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 2 hrs to fix
l10n_it_invoices_data_communication/models/communication.py on lines 982..988

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        for line in comunicazione.fatture_ricevute_ids:
            partner_limit += 1
            invoices_limit = len(line.fatture_ricevute_body_ids)
            if invoices_limit > 1000:
                errors += [
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 2 hrs to fix
l10n_it_invoices_data_communication/models/communication.py on lines 770..776

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    @api.model
    def create(self, vals):
        payment_order_ids = self._context.get('active_ids', [])
        vals.update({
            'payment_order_ids': [[6, 0, payment_order_ids]],
Severity: Major
Found in l10n_it_sepa_bonifici/wizard/export_sepa_cbi.py and 1 other location - About 2 hrs to fix
l10n_it_sepa_bonifici/wizard/export_sepa_cbi_estero.py on lines 71..77

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    @api.model
    def create(self, vals):
        payment_order_ids = self._context.get('active_ids', [])
        vals.update({
            'payment_order_ids': [[6, 0, payment_order_ids]],
Severity: Major
Found in l10n_it_sepa_bonifici/wizard/export_sepa_cbi_estero.py and 1 other location - About 2 hrs to fix
l10n_it_sepa_bonifici/wizard/export_sepa_cbi.py on lines 53..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function importFatturaPA has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    def importFatturaPA(self):
        fatturapa_attachment_obj = self.env['fatturapa.attachment.in']
        fatturapa_attachment_ids = self.env.context.get('active_ids', False)
        invoice_model = self.env['account.invoice']
        new_invoices = []
Severity: Minor
Found in l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py - About 2 hrs 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 test_16_xml_import has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    def test_16_xml_import(self):
        # file B2B downloaded from
        # http://www.fatturapa.gov.it/export/fatturazione/it/a-3.htm
        res = self.run_wizard('test16a', 'IT01234567890_FPR03.xml')
        invoice_ids = res.get('domain')[0][2]
Severity: Minor
Found in l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py - About 2 hrs 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 create_fatturapa_attachment_in has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    def create_fatturapa_attachment_in(self, attachment):
        decoded = base64.b64decode(attachment.datas)
        fatturapa_attachment_in = self.env['fatturapa.attachment.in']
        fetchmail_server_id = self.env.context.get('fetchmail_server_id')
        company_id = False
Severity: Minor
Found in l10n_it_fatturapa_pec/models/mail_thread.py - About 2 hrs 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 setDatiPagamento has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    def setDatiPagamento(self, invoice, body):
        if invoice.payment_term and invoice.withholding_tax_line:
            DatiPagamento = DatiPagamentoType()
            if not invoice.payment_term.fatturapa_pt_id:
                raise UserError(
Severity: Minor
Found in l10n_it_fatturapa_out_wt/wizard/wizard_export_fatturapa.py - About 2 hrs 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 create_sepa has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    def create_sepa(self):
        """Creates the SEPA Credit Transfer file. That's the important code!"""
        self.ensure_one()
        sepa_export = self[0]
        pain_flavor = self.payment_order_ids[0].mode.type.code
Severity: Minor
Found in l10n_it_sepa_bonifici/wizard/export_sepa_cbi.py - About 2 hrs 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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        in_invoice = self.invoice_model.create({
            'date_invoice': self.recent_date,
            'account_id': self.env.ref('account.a_pay').id,
            'journal_id': self.env.ref('account.expenses_journal').id,
            'partner_id': self.env.ref('base.res_partner_4').id,
Severity: Major
Found in account_vat_period_end_statement/tests/test_vat_statement.py and 1 other location - About 2 hrs to fix
account_vat_period_end_statement/tests/test_vat_statement.py on lines 83..88

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def action_confirmed(self, cr, uid, ids, context=None):
        for pt in self.browse(cr, uid, ids):
            wf_service = netsvc.LocalService("workflow")
            wf_service.trg_validate(uid, self._name,
                                    pt.id, 'confirmed', cr)
Severity: Major
Found in l10n_it_withholding_tax_payment/models/withholding_tax.py and 1 other location - About 2 hrs to fix
l10n_it_withholding_tax_payment/models/withholding_tax.py on lines 191..196

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def action_set_to_draft(self, cr, uid, ids, context=None):
        for pt in self.browse(cr, uid, ids):
            wf_service = netsvc.LocalService("workflow")
            wf_service.trg_validate(uid, self._name,
                                    pt.id, 'cancel', cr)
Severity: Major
Found in l10n_it_withholding_tax_payment/models/withholding_tax.py and 1 other location - About 2 hrs to fix
l10n_it_withholding_tax_payment/models/withholding_tax.py on lines 184..189

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        out_invoice = self.invoice_model.create({
            'date_invoice': self.recent_date,
            'account_id': self.env.ref('account.a_recv').id,
            'journal_id': self.env.ref('account.sales_journal').id,
            'partner_id': self.env.ref('base.res_partner_3').id,
Severity: Major
Found in account_vat_period_end_statement/tests/test_vat_statement.py and 1 other location - About 2 hrs to fix
account_vat_period_end_statement/tests/test_vat_statement.py on lines 100..105

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

            if tax.ref_base_code_id:
                if self.exist(
                    cr, uid, 'ref_base_code_id', tax.ref_base_code_id.id,
                    tax.id, context=context
                ):
Severity: Major
Found in l10n_it_account/models/account_tax.py and 3 other locations - About 2 hrs to fix
l10n_it_account/models/account_tax.py on lines 235..243
l10n_it_account/models/account_tax.py on lines 244..252
l10n_it_account/models/account_tax.py on lines 262..270

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

class ModalitaPagamentoType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'ModalitaPagamentoType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

class StatoLiquidazioneType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'StatoLiquidazioneType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

            if tax.base_code_id:
                if self.exist(
                    cr, uid, 'base_code_id', tax.base_code_id.id, tax.id,
                    context=context
                ):
Severity: Major
Found in l10n_it_account/models/account_tax.py and 3 other locations - About 2 hrs to fix
l10n_it_account/models/account_tax.py on lines 244..252
l10n_it_account/models/account_tax.py on lines 253..261
l10n_it_account/models/account_tax.py on lines 262..270

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

class TipoCassaType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'TipoCassaType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

class SoggettoEmittenteType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'SoggettoEmittenteType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 18 locations. Consider refactoring.
Open

class EsigibilitaIVAType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'EsigibilitaIVAType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language