wafo-project/pywafo

View on GitHub
src/wafo/win32_utils.py

Summary

Maintainability
F
3 days
Test Coverage

Remove this commented out code.
Open

#    wb2 = Waitbar2('Waitbar example')
Severity: Major
Found in src/wafo/win32_utils.py by sonar-python

Programmers should not comment out code as it bloats programs and reduces readability.

Unused code should be deleted and can be retrieved from source control history if required.

See

  • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
  • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
  • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
  • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

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

            int(round(
                GetSystemMetrics(win32con.SM_CYSCREEN) * .5 - height * .5)),
Severity: Major
Found in src/wafo/win32_utils.py and 1 other location - About 2 hrs to fix
src/wafo/win32_utils.py on lines 107..108

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 33.

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

            int(round(
                GetSystemMetrics(win32con.SM_CXSCREEN) * .5 - width * .5)),
Severity: Major
Found in src/wafo/win32_utils.py and 1 other location - About 2 hrs to fix
src/wafo/win32_utils.py on lines 109..110

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 33.

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 run(self):
        # MessageBox(self.message, self.title, win32con.MB_ICONWARNING)
        MessageBox(0, self.message, self.title,
                   win32con.MB_ICONWARNING | win32con.MB_SYSTEMMODAL)
Severity: Major
Found in src/wafo/win32_utils.py and 1 other location - About 2 hrs to fix
src/wafo/win32_utils.py on lines 241..244

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 30.

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 run(self):
        # MessageBox(self.message, self.title, win32con.MB_ICONERROR)
        MessageBox(0, self.message, self.title,
                   win32con.MB_ICONERROR | win32con.MB_SYSTEMMODAL)
Severity: Major
Found in src/wafo/win32_utils.py and 1 other location - About 2 hrs to fix
src/wafo/win32_utils.py on lines 224..227

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 30.

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

                win32con.WS_VISIBLE | win32con.WS_CHILD | win32con.BS_PUSHBUTTON,  # @IgnorePep8
Severity: Major
Found in src/wafo/win32_utils.py and 1 other location - About 1 hr to fix
src/wafo/fig.py on lines 90..90

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 19.

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 3 locations. Consider refactoring.
Open

            if not self.do_update:
                self.position = pos
                self.do_update = True
Severity: Major
Found in src/wafo/win32_utils.py and 2 other locations - About 55 mins to fix
src/wafo/misc.py on lines 688..690
src/wafo/spectrum/models.py on lines 128..130

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 15.

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

from win32gui import (InitCommonControls, CallWindowProc, CreateWindowEx,
Severity: Minor
Found in src/wafo/win32_utils.py and 1 other location - About 55 mins to fix
src/wafo/wave_theory/dispersion_relation.py on lines 10..10

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 15.

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

        print(wb.update(i * 5))
Severity: Major
Found in src/wafo/win32_utils.py and 3 other locations - About 45 mins to fix
src/wafo/markov.py on lines 396..396
src/wafo/stats/_continuous_distns.py on lines 5909..5909
src/wafo/stats/_continuous_distns.py on lines 5969..5969

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 13.

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

        self.oldWndProc = SetWindowLong(
            self.dialog,
            win32con.GWL_WNDPROC,
            self.DlgProc)
Severity: Minor
Found in src/wafo/win32_utils.py and 1 other location - About 45 mins to fix
src/wafo/win32_utils.py on lines 90..92

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 13.

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_SetWindowLong(self.dialog,
                              win32con.GWL_WNDPROC,
                              self.oldWndProc)
Severity: Minor
Found in src/wafo/win32_utils.py and 1 other location - About 45 mins to fix
src/wafo/win32_utils.py on lines 144..147

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 13.

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 3 locations. Consider refactoring.
Open

        ShowWindow(self.progbar, win32con.SW_SHOW)
Severity: Major
Found in src/wafo/win32_utils.py and 2 other locations - About 40 mins to fix
src/wafo/tests/test_containers.py on lines 27..27
src/wafo/tests/test_dct_pack.py on lines 18..18

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 12.

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 23 locations. Consider refactoring.
Open

PBM_SETBARCOLOR = (WM_USER + 9)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_SETSTATE = (WM_USER + 16)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_SETSTEP = (WM_USER + 4)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_GETRANGE = (WM_USER + 7)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_STEPIT = (WM_USER + 5)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_SETPOS = (WM_USER + 2)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_SETRANGE32 = (WM_USER + 6)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_DELTAPOS = (WM_USER + 3)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_SETMARQUEE = (WM_USER + 10)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_GETBARCOLOR = (WM_USER + 15)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_GETBKCOLOR = (WM_USER + 14)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_SETRANGE = (WM_USER + 1)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_GETPOS = (WM_USER + 8)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_GETSTEP = (WM_USER + 13)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28
src/wafo/win32_utils.py on lines 29..29

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 11.

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 23 locations. Consider refactoring.
Open

PBM_GETSTATE = (WM_USER + 17)
Severity: Major
Found in src/wafo/win32_utils.py and 22 other locations - About 35 mins to fix
src/wafo/_misc_numba.py on lines 192..192
src/wafo/gaussian.py on lines 364..364
src/wafo/integrate.py on lines 348..348
src/wafo/objects.py on lines 2572..2572
src/wafo/spectrum/core.py on lines 2132..2132
src/wafo/spectrum/core.py on lines 3472..3472
src/wafo/spectrum/models.py on lines 1117..1117
src/wafo/stats/estimation.py on lines 1624..1624
src/wafo/win32_utils.py on lines 15..15
src/wafo/win32_utils.py on lines 16..16
src/wafo/win32_utils.py on lines 17..17
src/wafo/win32_utils.py on lines 18..18
src/wafo/win32_utils.py on lines 19..19
src/wafo/win32_utils.py on lines 20..20
src/wafo/win32_utils.py on lines 21..21
src/wafo/win32_utils.py on lines 22..22
src/wafo/win32_utils.py on lines 23..23
src/wafo/win32_utils.py on lines 24..24
src/wafo/win32_utils.py on lines 25..25
src/wafo/win32_utils.py on lines 26..26
src/wafo/win32_utils.py on lines 27..27
src/wafo/win32_utils.py on lines 28..28

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 11.

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 6 locations. Consider refactoring.
Open

        self.hinst = GetModuleHandle(None)
Severity: Major
Found in src/wafo/win32_utils.py and 5 other locations - About 35 mins to fix
src/wafo/containers.py on lines 85..85
src/wafo/containers.py on lines 259..260
src/wafo/containers.py on lines 249..265
src/wafo/kdetools/kdetools.py on lines 82..85
src/wafo/stats/core.py on lines 1067..1067

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 11.

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

    if GetClassName(hwnd) == TOOLTIPS_CLASS:
Severity: Minor
Found in src/wafo/win32_utils.py and 1 other location - About 35 mins to fix
src/wafo/stats/_distn_infrastructure.py on lines 252..252

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 11.

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

Rename function "MAKELPARAM" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def MAKELPARAM(a, b):
Severity: Major
Found in src/wafo/win32_utils.py by sonar-python

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

There are no issues that match your filters.

Category
Status