From ee8cde46b79a4d665f6dfbfde945c00c18470fa4 Mon Sep 17 00:00:00 2001 From: tanshu Date: Sun, 17 Apr 2022 13:44:56 +0530 Subject: [PATCH] Chore: Linted. --- docker/vars/default.yml | 4 ++-- lint.sh | 8 ++++---- luthor/.gitignore | 1 + luthor/luthor/models/user.py | 2 -- .../app/acts/act-detail/act-detail.component.spec.ts | 12 +++++------- .../advocate-detail.component.spec.ts | 12 +++++------- .../case-source-detail.component.spec.ts | 12 +++++------- .../case-type-detail.component.spec.ts | 12 +++++------- .../cases/case-detail/case-detail.component.spec.ts | 12 +++++------- .../case-detail/hearing-dialog.component.spec.ts | 12 +++++------- otis/src/app/cases/case-list/case-list-datasource.ts | 3 ++- otis/src/app/cause-list/cause-list-datasource.ts | 6 +++--- .../compliance-list/compliance-list-datasource.ts | 6 +++--- .../contact-detail/contact-detail.component.spec.ts | 12 +++++------- .../court-status-detail.component.spec.ts | 12 +++++------- .../court-detail/court-detail.component.spec.ts | 12 +++++------- .../department-detail.component.spec.ts | 12 +++++------- .../discount-report.component.spec.ts | 12 +++++------- .../nature-detail/nature-detail.component.spec.ts | 12 +++++------- otis/src/app/nav-bar/nav-bar.component.spec.ts | 12 +++++------- .../office-status-detail.component.spec.ts | 12 +++++------- .../office-detail/office-detail.component.spec.ts | 12 +++++------- .../roles/role-detail/role-detail.component.spec.ts | 12 +++++------- .../app/sale-report/sale-report.component.spec.ts | 12 +++++------- otis/src/app/tax-report/tax-report.component.spec.ts | 12 +++++------- .../users/user-detail/user-detail.component.spec.ts | 12 +++++------- 26 files changed, 110 insertions(+), 148 deletions(-) diff --git a/docker/vars/default.yml b/docker/vars/default.yml index a3a8744..7a16e57 100644 --- a/docker/vars/default.yml +++ b/docker/vars/default.yml @@ -1,5 +1,5 @@ --- -http_host: "luthor.tanshu.com" -http_conf: "luthor.tanshu.com.conf" +http_host: "www.anubhachambers.com" +http_conf: "www.anubhachambers.com.conf" host_port: "8342" host_directory: "luthor" diff --git a/lint.sh b/lint.sh index d856222..7d7c727 100755 --- a/lint.sh +++ b/lint.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P ) cd "$parent_path/otis" || exit -npx prettier --write src/ +npx prettier --write src/app npx ng lint --fix cd "$parent_path/luthor" || exit -isort luthor -black luthor -flake8 luthor +poetry run isort luthor +poetry run black luthor +poetry run flake8 luthor diff --git a/luthor/.gitignore b/luthor/.gitignore index 7269916..227c198 100644 --- a/luthor/.gitignore +++ b/luthor/.gitignore @@ -1,3 +1,4 @@ *.pyc */__pycache__/ *.egg-info/ +poetry.lock \ No newline at end of file diff --git a/luthor/luthor/models/user.py b/luthor/luthor/models/user.py index b4439f7..a0879df 100644 --- a/luthor/luthor/models/user.py +++ b/luthor/luthor/models/user.py @@ -1,7 +1,5 @@ import uuid -from hashlib import md5 - from sqlalchemy import Boolean, Column, Unicode, text from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import Session, relationship, synonym diff --git a/otis/src/app/acts/act-detail/act-detail.component.spec.ts b/otis/src/app/acts/act-detail/act-detail.component.spec.ts index 3a4a30f..ca95b40 100644 --- a/otis/src/app/acts/act-detail/act-detail.component.spec.ts +++ b/otis/src/app/acts/act-detail/act-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('ActDetailComponent', () => { let component: ActDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ActDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ActDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(ActDetailComponent); diff --git a/otis/src/app/advocates/advocate-detail/advocate-detail.component.spec.ts b/otis/src/app/advocates/advocate-detail/advocate-detail.component.spec.ts index 91db93a..e0ecf72 100644 --- a/otis/src/app/advocates/advocate-detail/advocate-detail.component.spec.ts +++ b/otis/src/app/advocates/advocate-detail/advocate-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('AdvocateDetailComponent', () => { let component: AdvocateDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [AdvocateDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AdvocateDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(AdvocateDetailComponent); diff --git a/otis/src/app/case-sources/case-source-detail/case-source-detail.component.spec.ts b/otis/src/app/case-sources/case-source-detail/case-source-detail.component.spec.ts index bd4a2f5..c20e2d5 100644 --- a/otis/src/app/case-sources/case-source-detail/case-source-detail.component.spec.ts +++ b/otis/src/app/case-sources/case-source-detail/case-source-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('CaseSourceDetailComponent', () => { let component: CaseSourceDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [CaseSourceDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [CaseSourceDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(CaseSourceDetailComponent); diff --git a/otis/src/app/case-types/case-type-detail/case-type-detail.component.spec.ts b/otis/src/app/case-types/case-type-detail/case-type-detail.component.spec.ts index cc3c859..c929ce6 100644 --- a/otis/src/app/case-types/case-type-detail/case-type-detail.component.spec.ts +++ b/otis/src/app/case-types/case-type-detail/case-type-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('CaseTypeDetailComponent', () => { let component: CaseTypeDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [CaseTypeDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [CaseTypeDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(CaseTypeDetailComponent); diff --git a/otis/src/app/cases/case-detail/case-detail.component.spec.ts b/otis/src/app/cases/case-detail/case-detail.component.spec.ts index 75daf92..5c6687c 100644 --- a/otis/src/app/cases/case-detail/case-detail.component.spec.ts +++ b/otis/src/app/cases/case-detail/case-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('CaseDetailComponent', () => { let component: CaseDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [CaseDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [CaseDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(CaseDetailComponent); diff --git a/otis/src/app/cases/case-detail/hearing-dialog.component.spec.ts b/otis/src/app/cases/case-detail/hearing-dialog.component.spec.ts index e2ed6e9..c0b15ea 100644 --- a/otis/src/app/cases/case-detail/hearing-dialog.component.spec.ts +++ b/otis/src/app/cases/case-detail/hearing-dialog.component.spec.ts @@ -6,13 +6,11 @@ describe('HearingDialogComponent', () => { let component: HearingDialogComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [HearingDialogComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [HearingDialogComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(HearingDialogComponent); diff --git a/otis/src/app/cases/case-list/case-list-datasource.ts b/otis/src/app/cases/case-list/case-list-datasource.ts index 567e512..8b535de 100644 --- a/otis/src/app/cases/case-list/case-list-datasource.ts +++ b/otis/src/app/cases/case-list/case-list-datasource.ts @@ -48,7 +48,8 @@ export class CaseListDataSource extends DataSource { return this.searchValues.split(' ').reduce( (p: Case[], c: string) => p.filter((x) => { - const accountString = `${x.caseSource.prefix}-${x.officeFileNumber} ${x.courtCaseNumber} ${x.year} ${x.title} + const accountString = + `${x.caseSource.prefix}-${x.officeFileNumber} ${x.courtCaseNumber} ${x.year} ${x.title} ${x.docketNumber} ${x.remarks}`.toLowerCase(); return accountString.indexOf(c) !== -1; }), diff --git a/otis/src/app/cause-list/cause-list-datasource.ts b/otis/src/app/cause-list/cause-list-datasource.ts index 6bb30d6..be1c88e 100644 --- a/otis/src/app/cause-list/cause-list-datasource.ts +++ b/otis/src/app/cause-list/cause-list-datasource.ts @@ -22,13 +22,13 @@ export class CauseListDatasource extends DataSource { return merge(...dataMutations) .pipe( - tap((x: Case[]) => { + tap((x) => { if (this.paginator) { - this.paginator.length = x.length; + this.paginator.length = this.dataValues.length; } }), ) - .pipe(map((x: Case[]) => this.getPagedData(this.dataValues))); + .pipe(map((x) => this.getPagedData(this.dataValues))); } disconnect() {} diff --git a/otis/src/app/compliance-list/compliance-list-datasource.ts b/otis/src/app/compliance-list/compliance-list-datasource.ts index e3fadae..8e19b2d 100644 --- a/otis/src/app/compliance-list/compliance-list-datasource.ts +++ b/otis/src/app/compliance-list/compliance-list-datasource.ts @@ -21,13 +21,13 @@ export class ComplianceListDatasource extends DataSource { return merge(...dataMutations) .pipe( - tap((x: ComplianceList[]) => { + tap((x) => { if (this.paginator) { - this.paginator.length = x.length; + this.paginator.length = this.data.length; } }), ) - .pipe(map((x: ComplianceList[]) => this.getPagedData(this.data))); + .pipe(map((x) => this.getPagedData(this.data))); } disconnect() {} diff --git a/otis/src/app/contacts/contact-detail/contact-detail.component.spec.ts b/otis/src/app/contacts/contact-detail/contact-detail.component.spec.ts index 0d03f03..76deaa0 100644 --- a/otis/src/app/contacts/contact-detail/contact-detail.component.spec.ts +++ b/otis/src/app/contacts/contact-detail/contact-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('ContactDetailComponent', () => { let component: ContactDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ContactDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ContactDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(ContactDetailComponent); diff --git a/otis/src/app/court-statuses/court-status-detail/court-status-detail.component.spec.ts b/otis/src/app/court-statuses/court-status-detail/court-status-detail.component.spec.ts index d2bbead..898334e 100644 --- a/otis/src/app/court-statuses/court-status-detail/court-status-detail.component.spec.ts +++ b/otis/src/app/court-statuses/court-status-detail/court-status-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('CourtStatusDetailComponent', () => { let component: CourtStatusDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [CourtStatusDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [CourtStatusDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(CourtStatusDetailComponent); diff --git a/otis/src/app/courts/court-detail/court-detail.component.spec.ts b/otis/src/app/courts/court-detail/court-detail.component.spec.ts index 5a6657d..1ab036b 100644 --- a/otis/src/app/courts/court-detail/court-detail.component.spec.ts +++ b/otis/src/app/courts/court-detail/court-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('CourtDetailComponent', () => { let component: CourtDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [CourtDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [CourtDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(CourtDetailComponent); diff --git a/otis/src/app/departments/department-detail/department-detail.component.spec.ts b/otis/src/app/departments/department-detail/department-detail.component.spec.ts index e581f6c..618d0f9 100644 --- a/otis/src/app/departments/department-detail/department-detail.component.spec.ts +++ b/otis/src/app/departments/department-detail/department-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('DepartmentDetailComponent', () => { let component: DepartmentDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [DepartmentDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [DepartmentDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(DepartmentDetailComponent); diff --git a/otis/src/app/discount-report/discount-report.component.spec.ts b/otis/src/app/discount-report/discount-report.component.spec.ts index 80a32ec..aaacddb 100644 --- a/otis/src/app/discount-report/discount-report.component.spec.ts +++ b/otis/src/app/discount-report/discount-report.component.spec.ts @@ -6,13 +6,11 @@ describe('DiscountReportComponent', () => { let component: DiscountReportComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [DiscountReportComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [DiscountReportComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(DiscountReportComponent); diff --git a/otis/src/app/natures/nature-detail/nature-detail.component.spec.ts b/otis/src/app/natures/nature-detail/nature-detail.component.spec.ts index d9c5fce..e5af6f0 100644 --- a/otis/src/app/natures/nature-detail/nature-detail.component.spec.ts +++ b/otis/src/app/natures/nature-detail/nature-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('NatureDetailComponent', () => { let component: NatureDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [NatureDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [NatureDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(NatureDetailComponent); diff --git a/otis/src/app/nav-bar/nav-bar.component.spec.ts b/otis/src/app/nav-bar/nav-bar.component.spec.ts index 2adf2ce..dbf3c45 100644 --- a/otis/src/app/nav-bar/nav-bar.component.spec.ts +++ b/otis/src/app/nav-bar/nav-bar.component.spec.ts @@ -6,13 +6,11 @@ describe('NavBarComponent', () => { let component: NavBarComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [NavBarComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [NavBarComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(NavBarComponent); diff --git a/otis/src/app/office-statuses/office-status-detail/office-status-detail.component.spec.ts b/otis/src/app/office-statuses/office-status-detail/office-status-detail.component.spec.ts index 2427d16..f46f8f5 100644 --- a/otis/src/app/office-statuses/office-status-detail/office-status-detail.component.spec.ts +++ b/otis/src/app/office-statuses/office-status-detail/office-status-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('OfficeStatusDetailComponent', () => { let component: OfficeStatusDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [OfficeStatusDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [OfficeStatusDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(OfficeStatusDetailComponent); diff --git a/otis/src/app/offices/office-detail/office-detail.component.spec.ts b/otis/src/app/offices/office-detail/office-detail.component.spec.ts index a8a33c6..b8c187e 100644 --- a/otis/src/app/offices/office-detail/office-detail.component.spec.ts +++ b/otis/src/app/offices/office-detail/office-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('OfficeDetailComponent', () => { let component: OfficeDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [OfficeDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [OfficeDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(OfficeDetailComponent); diff --git a/otis/src/app/roles/role-detail/role-detail.component.spec.ts b/otis/src/app/roles/role-detail/role-detail.component.spec.ts index a324a3c..18b2146 100644 --- a/otis/src/app/roles/role-detail/role-detail.component.spec.ts +++ b/otis/src/app/roles/role-detail/role-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('RoleDetailComponent', () => { let component: RoleDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [RoleDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [RoleDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(RoleDetailComponent); diff --git a/otis/src/app/sale-report/sale-report.component.spec.ts b/otis/src/app/sale-report/sale-report.component.spec.ts index 29c8bc2..070d5e1 100644 --- a/otis/src/app/sale-report/sale-report.component.spec.ts +++ b/otis/src/app/sale-report/sale-report.component.spec.ts @@ -6,13 +6,11 @@ describe('SaleReportComponent', () => { let component: SaleReportComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [SaleReportComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SaleReportComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(SaleReportComponent); diff --git a/otis/src/app/tax-report/tax-report.component.spec.ts b/otis/src/app/tax-report/tax-report.component.spec.ts index adbbb75..af87973 100644 --- a/otis/src/app/tax-report/tax-report.component.spec.ts +++ b/otis/src/app/tax-report/tax-report.component.spec.ts @@ -6,13 +6,11 @@ describe('TaxReportComponent', () => { let component: TaxReportComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [TaxReportComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [TaxReportComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(TaxReportComponent); diff --git a/otis/src/app/users/user-detail/user-detail.component.spec.ts b/otis/src/app/users/user-detail/user-detail.component.spec.ts index 8bb5bc3..a85cd5f 100644 --- a/otis/src/app/users/user-detail/user-detail.component.spec.ts +++ b/otis/src/app/users/user-detail/user-detail.component.spec.ts @@ -6,13 +6,11 @@ describe('UserDetailComponent', () => { let component: UserDetailComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [UserDetailComponent], - }).compileComponents(); - }), - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [UserDetailComponent], + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(UserDetailComponent);