Chore: Linted.

This commit is contained in:
Amritanshu Agrawal 2022-04-17 13:44:56 +05:30
parent d7b06cfdb4
commit ee8cde46b7
26 changed files with 110 additions and 148 deletions

@ -1,5 +1,5 @@
--- ---
http_host: "luthor.tanshu.com" http_host: "www.anubhachambers.com"
http_conf: "luthor.tanshu.com.conf" http_conf: "www.anubhachambers.com.conf"
host_port: "8342" host_port: "8342"
host_directory: "luthor" host_directory: "luthor"

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P ) parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )
cd "$parent_path/otis" || exit cd "$parent_path/otis" || exit
npx prettier --write src/ npx prettier --write src/app
npx ng lint --fix npx ng lint --fix
cd "$parent_path/luthor" || exit cd "$parent_path/luthor" || exit
isort luthor poetry run isort luthor
black luthor poetry run black luthor
flake8 luthor poetry run flake8 luthor

1
luthor/.gitignore vendored

@ -1,3 +1,4 @@
*.pyc *.pyc
*/__pycache__/ */__pycache__/
*.egg-info/ *.egg-info/
poetry.lock

@ -1,7 +1,5 @@
import uuid import uuid
from hashlib import md5
from sqlalchemy import Boolean, Column, Unicode, text from sqlalchemy import Boolean, Column, Unicode, text
from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import Session, relationship, synonym from sqlalchemy.orm import Session, relationship, synonym

@ -6,13 +6,11 @@ describe('ActDetailComponent', () => {
let component: ActDetailComponent; let component: ActDetailComponent;
let fixture: ComponentFixture<ActDetailComponent>; let fixture: ComponentFixture<ActDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [ActDetailComponent],
declarations: [ActDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(ActDetailComponent); fixture = TestBed.createComponent(ActDetailComponent);

@ -6,13 +6,11 @@ describe('AdvocateDetailComponent', () => {
let component: AdvocateDetailComponent; let component: AdvocateDetailComponent;
let fixture: ComponentFixture<AdvocateDetailComponent>; let fixture: ComponentFixture<AdvocateDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [AdvocateDetailComponent],
declarations: [AdvocateDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(AdvocateDetailComponent); fixture = TestBed.createComponent(AdvocateDetailComponent);

@ -6,13 +6,11 @@ describe('CaseSourceDetailComponent', () => {
let component: CaseSourceDetailComponent; let component: CaseSourceDetailComponent;
let fixture: ComponentFixture<CaseSourceDetailComponent>; let fixture: ComponentFixture<CaseSourceDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [CaseSourceDetailComponent],
declarations: [CaseSourceDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(CaseSourceDetailComponent); fixture = TestBed.createComponent(CaseSourceDetailComponent);

@ -6,13 +6,11 @@ describe('CaseTypeDetailComponent', () => {
let component: CaseTypeDetailComponent; let component: CaseTypeDetailComponent;
let fixture: ComponentFixture<CaseTypeDetailComponent>; let fixture: ComponentFixture<CaseTypeDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [CaseTypeDetailComponent],
declarations: [CaseTypeDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(CaseTypeDetailComponent); fixture = TestBed.createComponent(CaseTypeDetailComponent);

@ -6,13 +6,11 @@ describe('CaseDetailComponent', () => {
let component: CaseDetailComponent; let component: CaseDetailComponent;
let fixture: ComponentFixture<CaseDetailComponent>; let fixture: ComponentFixture<CaseDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [CaseDetailComponent],
declarations: [CaseDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(CaseDetailComponent); fixture = TestBed.createComponent(CaseDetailComponent);

@ -6,13 +6,11 @@ describe('HearingDialogComponent', () => {
let component: HearingDialogComponent; let component: HearingDialogComponent;
let fixture: ComponentFixture<HearingDialogComponent>; let fixture: ComponentFixture<HearingDialogComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [HearingDialogComponent],
declarations: [HearingDialogComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(HearingDialogComponent); fixture = TestBed.createComponent(HearingDialogComponent);

@ -48,7 +48,8 @@ export class CaseListDataSource extends DataSource<Case> {
return this.searchValues.split(' ').reduce( return this.searchValues.split(' ').reduce(
(p: Case[], c: string) => (p: Case[], c: string) =>
p.filter((x) => { 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(); ${x.docketNumber} ${x.remarks}`.toLowerCase();
return accountString.indexOf(c) !== -1; return accountString.indexOf(c) !== -1;
}), }),

@ -22,13 +22,13 @@ export class CauseListDatasource extends DataSource<Case> {
return merge(...dataMutations) return merge(...dataMutations)
.pipe( .pipe(
tap((x: Case[]) => { tap((x) => {
if (this.paginator) { 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() {} disconnect() {}

@ -21,13 +21,13 @@ export class ComplianceListDatasource extends DataSource<ComplianceList> {
return merge(...dataMutations) return merge(...dataMutations)
.pipe( .pipe(
tap((x: ComplianceList[]) => { tap((x) => {
if (this.paginator) { 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() {} disconnect() {}

@ -6,13 +6,11 @@ describe('ContactDetailComponent', () => {
let component: ContactDetailComponent; let component: ContactDetailComponent;
let fixture: ComponentFixture<ContactDetailComponent>; let fixture: ComponentFixture<ContactDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [ContactDetailComponent],
declarations: [ContactDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(ContactDetailComponent); fixture = TestBed.createComponent(ContactDetailComponent);

@ -6,13 +6,11 @@ describe('CourtStatusDetailComponent', () => {
let component: CourtStatusDetailComponent; let component: CourtStatusDetailComponent;
let fixture: ComponentFixture<CourtStatusDetailComponent>; let fixture: ComponentFixture<CourtStatusDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [CourtStatusDetailComponent],
declarations: [CourtStatusDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(CourtStatusDetailComponent); fixture = TestBed.createComponent(CourtStatusDetailComponent);

@ -6,13 +6,11 @@ describe('CourtDetailComponent', () => {
let component: CourtDetailComponent; let component: CourtDetailComponent;
let fixture: ComponentFixture<CourtDetailComponent>; let fixture: ComponentFixture<CourtDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [CourtDetailComponent],
declarations: [CourtDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(CourtDetailComponent); fixture = TestBed.createComponent(CourtDetailComponent);

@ -6,13 +6,11 @@ describe('DepartmentDetailComponent', () => {
let component: DepartmentDetailComponent; let component: DepartmentDetailComponent;
let fixture: ComponentFixture<DepartmentDetailComponent>; let fixture: ComponentFixture<DepartmentDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [DepartmentDetailComponent],
declarations: [DepartmentDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(DepartmentDetailComponent); fixture = TestBed.createComponent(DepartmentDetailComponent);

@ -6,13 +6,11 @@ describe('DiscountReportComponent', () => {
let component: DiscountReportComponent; let component: DiscountReportComponent;
let fixture: ComponentFixture<DiscountReportComponent>; let fixture: ComponentFixture<DiscountReportComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [DiscountReportComponent],
declarations: [DiscountReportComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(DiscountReportComponent); fixture = TestBed.createComponent(DiscountReportComponent);

@ -6,13 +6,11 @@ describe('NatureDetailComponent', () => {
let component: NatureDetailComponent; let component: NatureDetailComponent;
let fixture: ComponentFixture<NatureDetailComponent>; let fixture: ComponentFixture<NatureDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [NatureDetailComponent],
declarations: [NatureDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(NatureDetailComponent); fixture = TestBed.createComponent(NatureDetailComponent);

@ -6,13 +6,11 @@ describe('NavBarComponent', () => {
let component: NavBarComponent; let component: NavBarComponent;
let fixture: ComponentFixture<NavBarComponent>; let fixture: ComponentFixture<NavBarComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [NavBarComponent],
declarations: [NavBarComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(NavBarComponent); fixture = TestBed.createComponent(NavBarComponent);

@ -6,13 +6,11 @@ describe('OfficeStatusDetailComponent', () => {
let component: OfficeStatusDetailComponent; let component: OfficeStatusDetailComponent;
let fixture: ComponentFixture<OfficeStatusDetailComponent>; let fixture: ComponentFixture<OfficeStatusDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [OfficeStatusDetailComponent],
declarations: [OfficeStatusDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(OfficeStatusDetailComponent); fixture = TestBed.createComponent(OfficeStatusDetailComponent);

@ -6,13 +6,11 @@ describe('OfficeDetailComponent', () => {
let component: OfficeDetailComponent; let component: OfficeDetailComponent;
let fixture: ComponentFixture<OfficeDetailComponent>; let fixture: ComponentFixture<OfficeDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [OfficeDetailComponent],
declarations: [OfficeDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(OfficeDetailComponent); fixture = TestBed.createComponent(OfficeDetailComponent);

@ -6,13 +6,11 @@ describe('RoleDetailComponent', () => {
let component: RoleDetailComponent; let component: RoleDetailComponent;
let fixture: ComponentFixture<RoleDetailComponent>; let fixture: ComponentFixture<RoleDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [RoleDetailComponent],
declarations: [RoleDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(RoleDetailComponent); fixture = TestBed.createComponent(RoleDetailComponent);

@ -6,13 +6,11 @@ describe('SaleReportComponent', () => {
let component: SaleReportComponent; let component: SaleReportComponent;
let fixture: ComponentFixture<SaleReportComponent>; let fixture: ComponentFixture<SaleReportComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [SaleReportComponent],
declarations: [SaleReportComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(SaleReportComponent); fixture = TestBed.createComponent(SaleReportComponent);

@ -6,13 +6,11 @@ describe('TaxReportComponent', () => {
let component: TaxReportComponent; let component: TaxReportComponent;
let fixture: ComponentFixture<TaxReportComponent>; let fixture: ComponentFixture<TaxReportComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [TaxReportComponent],
declarations: [TaxReportComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(TaxReportComponent); fixture = TestBed.createComponent(TaxReportComponent);

@ -6,13 +6,11 @@ describe('UserDetailComponent', () => {
let component: UserDetailComponent; let component: UserDetailComponent;
let fixture: ComponentFixture<UserDetailComponent>; let fixture: ComponentFixture<UserDetailComponent>;
beforeEach( beforeEach(waitForAsync(() => {
waitForAsync(() => { TestBed.configureTestingModule({
TestBed.configureTestingModule({ declarations: [UserDetailComponent],
declarations: [UserDetailComponent], }).compileComponents();
}).compileComponents(); }));
}),
);
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(UserDetailComponent); fixture = TestBed.createComponent(UserDetailComponent);